mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
add syntax and syntax's software to list details endpoint
This commit is contained in:
parent
221d4938bd
commit
dade89d8c2
2 changed files with 19 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ public class ListDetailsDto
|
|||
public string PolicyUrl { get; set; }
|
||||
public DateTime? PublishedDate { get; set; }
|
||||
public string SubmissionUrl { get; set; }
|
||||
public ListSyntaxDto Syntax { get; set; }
|
||||
public string ViewUrl { get; set; }
|
||||
}
|
||||
|
||||
|
|
@ -45,4 +46,17 @@ public class ListLicenseDto
|
|||
public string DescriptionUrl { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class ListSyntaxDto
|
||||
{
|
||||
public string DefinitionUrl { get; set; }
|
||||
public string Name { get; set; }
|
||||
public IEnumerable<SyntaxSupportedSoftwareDto> SupportedSoftware { get; set; }
|
||||
}
|
||||
|
||||
public class SyntaxSupportedSoftwareDto
|
||||
{
|
||||
public string HomeUrl { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -25,6 +25,11 @@ public MappingProfiles()
|
|||
.ForMember(dto => dto.AdditionalLists,
|
||||
conf => conf.MapFrom(maint =>
|
||||
maint.FilterListMaintainers.Select(listMaints => listMaints.FilterList)));
|
||||
|
||||
CreateMap<Syntax, ListSyntaxDto>()
|
||||
.ForMember(dto => dto.SupportedSoftware,
|
||||
conf => conf.MapFrom(syntax =>
|
||||
syntax.SoftwareSyntaxes.Select(softSyn => softSyn.Software)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue