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

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -