Hi,
First of all thanks alot for such a great framework!
–
We have two endpoints in the same route, one takes a Guid and the othre takes a long.
When trying to reach the endpoint with a Guid, ServiceStack picks the one with a long and throws the following error:
“The request contained the following invalid parameter errors: ‘A2B2A16A-622A-4620-89CA-5D4008211E7A’ is an Invalid value for ‘Id’”
Endpoint: /domains/info/A2B2A16A-622A-4620-89CA-5D4008211E7A
Our solution is to place a type in the constructor instead, i.e public DomainInfo Get(GetDomainInfoById request)
but wondering why it picks the endpoint with the long?
/// <summary>
/// Retrieves a domain
/// </summary>
[Api("Retrieves a domain")]
[Route("/domains/{id}", "GET")]
public class GetDomainById : BaseRequestDto, IReturn<Domain>
{
[DataMember(Name = "id")]
public long Id { get; set; }
}
/// <summary>
/// Retrieves a domain
/// </summary>
[Api("Retrieves a domain")]
[Route("/domains/{id}", "GET")]
public class GetDomainByGuid : BaseRequestDto, IReturn<Domain>
{
[DataMember(Name = "id")]
public Guid Id { get; set; }
}