swashbuckle - Swagger: support for optional routes -
i have route optional parameter:
[route("{categoryid?}")] public httpresponsemessage get(int? categoryid=null)
however, when don't provide value categoryid
call includes {categoryid?}
in request itself...
http://myhost/api/%7bcategoryid%7d
swagger has no support optional path parameters. if wish document way, you'd have create 2 separate paths - 1 without path parameter , 1 with.
Comments
Post a Comment