OpenAPI.NET.CSharpAnnotations icon indicating copy to clipboard operation
OpenAPI.NET.CSharpAnnotations copied to clipboard

Cannot parse complex url parameter

Open arefinsami opened this issue 6 years ago • 3 comments

I have a url parameter like the following- <url>https://someserver.com/api/Products/{product?}?view={view} <url> But the swagger UI shows only- https://someserver.com/api/Products/{product

arefinsami avatar Oct 05 '19 17:10 arefinsami

@arefinsami is product? your path parameter name? or is it product

Shwetap05 avatar Oct 22 '19 19:10 Shwetap05

The parameter name is just 'product' and it is optional.

arefinsami avatar Oct 23 '19 23:10 arefinsami

@arefinsami if product is a path parameter per Open API specification it can not be optional, so it have to be documented like below for library to work

https://someserver.com/api/Products/{product}?view={view}

If you want it optional you would need to use it as query parameter

Shwetap05 avatar Oct 24 '19 17:10 Shwetap05