add syntax and syntax's software to list details endpoint

This commit is contained in:
Collin Barrett 2018-02-26 10:35:00 -06:00
parent 221d4938bd
commit dade89d8c2
2 changed files with 19 additions and 0 deletions

View file

@ -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; }
}
}

View file

@ -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)));
}
}
}