You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first off, thank you for creating this library, this covers almost all my use cases for API docs.
I have a peculiar situation with this where I am trying to showcase multiple use-cases for a single API endpoint in my docs. For example, I have an endpoint called /hello, where in one use-case I only have a field called input, while in the other I have an extra field called modifier. I am differentiating these endpoints by appending a # at the end of the url, so the endpoints would be like:
/hello
/hello#
This almost works as intended, except for the code sample that is generated for the /hello# endpoint is not correct. Both endpoints are supposed to be POST endpoints, but the second one generates the example as a GET request, for some reason. Same goes for when making the request as well.
I know that this is not standard practice for OpenAPI schema, which is why I am only asking for guidance to swizzle and modify it to suit my use-case. Any pointers regarding this would be much appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, first off, thank you for creating this library, this covers almost all my use cases for API docs.
I have a peculiar situation with this where I am trying to showcase multiple use-cases for a single API endpoint in my docs. For example, I have an endpoint called
/hello
, where in one use-case I only have a field calledinput
, while in the other I have an extra field calledmodifier
. I am differentiating these endpoints by appending a#
at the end of the url, so the endpoints would be like:/hello
/hello#
This almost works as intended, except for the code sample that is generated for the
/hello#
endpoint is not correct. Both endpoints are supposed to bePOST
endpoints, but the second one generates the example as aGET
request, for some reason. Same goes for when making the request as well.I know that this is not standard practice for OpenAPI schema, which is why I am only asking for guidance to swizzle and modify it to suit my use-case. Any pointers regarding this would be much appreciated!
This is the OpenAPI schema that I am using:
https://gist.github.com/vishalbd/9889f7dfbf336730ec4d5a11a0725819/raw/28355d30b6587e24e89cc2f9d019b3d02e2e8c8a/sample-openapi-schema.json
Beta Was this translation helpful? Give feedback.
All reactions