i have a DTO with a List of a complex type. The metadata page for the request DTO does not show the DatesToRepeat properties.
How can i make that show?
[Route("/bookings/repeat",
Summary = "Create new bookings",
Notes =
"Create new bookings if you are authorized to do so.",
Verbs = "POST")]
[ApiResponse(HttpStatusCode.Unauthorized, "You were unauthorized to call this service")]
//[Restrict(VisibleLocalhostOnly = true)]
public class CreateBookings : CreateBookingBase ,IReturn<CreateBookingsResponse>
{
[ApiMember(
Description =
"Set the dates you want to book and it's quantities. It's an array of dates and quantities.",
IsRequired = true)]
public List<DatesToRepeat> DatesToRepeat { get; set; }
}
Please provide a full compilable example of a Service Contract that doesn’t work as filling in the gaps of the missing classes works as expected:
[Route("/bookings/repeat",
Summary = "Create new bookings",
Notes =
"Create new bookings if you are authorized to do so.",
Verbs = "POST")]
[ApiResponse(HttpStatusCode.Unauthorized, "You were unauthorized to call this service")]
//[Restrict(VisibleLocalhostOnly = true)]
public class CreateBookings : CreateBookingBase ,IReturn<CreateBookingsResponse>
{
[ApiMember(
Description =
"Set the dates you want to book and it's quantities. It's an array of dates and quantities.",
IsRequired = true)]
public List<DatesToRepeat> DatesToRepeat { get; set; }
}
public class CreateBookingBase
{
public int Id { get; set; }
}
public class CreateBookingsResponse
{
public ResponseStatus ResponseStatus { get; set; }
}
public class DatesToRepeat
{
public int Ticks { get; set; }
}