Hi everyone,
I’m fairly new in servicestack, so bear with me. When using the openapi descriptions, every apimember description generates a “Exception thrown: ‘System.Reflection.TargetException’ in mscorlib.dll” when visualizeing the metadata for a service. It still does what it’s supposed to, though. So the code below contributes two errors (the description in the route itself does not generate one, the two apimembers do). I’d like to at least understand what’s going on, and if possible eliminate the errors. Anyone?
namespace DataCenterServiceSelfHost.ServiceModel
{
[Route("/dtm", Summary = @"Digital Terrain Model Service.", Notes = "Returns the altitude above sea level for a WGS84 coordinate pair.")]
public class DTMRequest : IReturn<DTMResponse>
{
[ApiMember(Description = "Longitude in decimal degrees", IsRequired = true)]
public string X { get; set; }
[ApiMember(Description = "Latitude in decimal degrees", IsRequired = true)]
public string Y { get; set; }
}
public class DTMResponse
{
public ResultHeight Result { get; set; }
}
public class ResultHeight
{
public string HeightAboveSeaLevel { get; set; }
public string TimeOfResponse { get; set; }
}
}