swashbuckle.examples

Swashbuckle MapType<Type> doesn't work with parameters

筅森魡賤 提交于 2019-12-02 07:20:14
问题 I've got an API endpoint that takes a ShortGuid class as a parameter, like such: [HttpGet("api/endpoint")] public async Task<IActionResult> GetTablesAsync(ShortGuid id){} Generates a swagger definition of: "parameters":[ { "name":"guid", "in":"query", "required":false, "type":"string", "format":"uuid" }, { "name":"value", "in":"query", "required":false, "type":"string" } ], I need to treat that parameter as a string, not a ShortGuid object. I already have a JsonConverter for the type that