-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OAS 3.0: Support for media type examples (aka request/response body examples) #3437
Comments
@webron , would you please share if this feature will be put on the release plan? |
Would like to add that also supporting |
any updates about this? |
Hi is there any progress on this? |
The docs state that this functionality exists: https://swagger.io/docs/specification/adding-examples/ @shockey Would it be possible to write in the documentation that this functionality is currently defective? It was pretty frustrating sitting their for an hour trying to get it working only to eventually find this issue. |
I believe @hkosova has the ability to correct those docs (I don't) 😄 |
Errors
Schema error at paths['/map/model'].post
should NOT have additional properties
additionalProperty: requestBody
Jump to line 596 '/map/model':
post:
requestBody:
content:
image/png:
schema:
type: string
format: binary Can I get help ? thks! |
@skyfore Make sure your spec is In the future, please don't hijack threads with unrelated questions. Open a new issue instead, or ask your syntax questions in the Google Group, IRC or on Stack Overflow. |
@hkosova OK,Thanks for your reply 😃 |
I'm also waiting for the implementation of this functionality. |
A possible temporary (but also ugly) workaround to get a real example being shown could be to use directly a Schema Object instead of a Reference and provide the schema example. This would eventually generate a provided example instead of example with types. |
Adding a link to PR: #4092 |
This issue is incredibly annoying. We're using the same Schema object in request and response, except that there are some subtle differences in how you should use it. It would have been perfect to be able to distinguish this with separate examples for the same schema object. Also showing multiple examples in requests will be awesome. Can't wait for this to be fixed! |
Any update ? |
Glad to know I wasn't going crazy. Spent the last hour trying to figure out why my examples were not working. |
Its not really possible to do proper API documentation without this feature. Implementation would be highly appreciated. |
Supporting |
Any news on the |
@b0ric, in the same boat, and this is my understanding:
|
@sasha-borodin, you're correct. We tracked support for |
Version:
ft/oas3
branch, as of commit a1ce0e7OpenAPI 3.0 has
requestBody.content.<media-type>.example(s)
andresponses.<code>.content.<media-type>.example(s)
. UI currently does not use these examples, but it would be great if it did. They are supposed to override schema-level examples if any.Spec:
The text was updated successfully, but these errors were encountered: