RequestDto dropping out parameters in request URL

I have a simple model:

 [Route("/Charts/People/Popular", "GET")]
public partial class GetChartPeoplePopular
    : IReturn<List<ChartPersonItem>>
    ///Determines where to start page.  Ex: 0 starts at the beginning.
    [ApiMember(DataType = "integer", Description = "Determines where to start page.  Ex: 0 starts at the beginning.", IsRequired = true)]
    public virtual short Skip { get; set; } 

    ///Determines the page size.  (Maximum of 100)
    [ApiMember(DataType="integer", Description="Determines the page size.  (Maximum of 100)", IsRequired=true)]
    public virtual short Take { get; set; }

When making a request like:

new GetChartPeoplePopular { Skip = 0, Take = 25 }

The Skip parameter is left out. This would not be an issue going directly to the the ServiceStack API but this is going through an API Management Proxy which is expecting the Skip parameter in the URL.

For reference the requestDTO.ToUrl() returns:


If I pass skip=1 it is included in the URL.
Is there a way to force the requestDto to include parameters?


new GetChartPeoplePopular { Skip = 0, Take = 25 }.ToJson()



Which I’ve just verified is also what’s returned in a Service. Do you have any JS custom configuration changing this behavior, e.g. changing ExcludeDefaultValues?

Otherwise change Skip to be a nullable type like int? so that 0 isn’t the default value, which you’ll also need to do if you want default values emitted when using any of the Reverse Routing extension methods.