-
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
JSON example no longer generated for object form-data properties #7268
Comments
@bfreuden Here is a fixed definition excerpt that works for me in https://editor.swagger.io. responses:
'200':
description: List of converted documents
content:
application/json:
schema:
$ref: "#/components/schemas/Document" |
@bfreuden Please ignore my previous comment, as it doesn't address the issue. Well, the definition fix is valid, just not the sample gen. responses:
'200':
description: List of converted documents
content:
application/json:
schema:
type: array
items:
"$ref": "#/components/schemas/Document" |
@tim-lai No problem! Thank you for having taken a look at the issue ^^ |
@tim-lai Thank you for fixing the issue! I've just tested the latest master branch and it is working very well :) |
Q&A
Content & configuration
Example Swagger/OpenAPI definition:
Swagger-UI configuration options:
Nothing special here, I'm using the "dist package" as is.
Describe the bug you're encountering
The JSON example of object form-data properties is no longer generated.
To reproduce...
Steps to reproduce the behavior:
Screenshot:
Expected behavior
In swagger-ui 3.41.0 we used to have a json example for object properties of form-data bodies:
Additional context or thoughts
It might be something incorrect in my spec though: maybe swagger-ui 3.42.0 is expecting something 3.41.0 was not expecting.
If it is the case I apologize for the bug report and I would be grateful for any hint that might help me correcting my spec.
If not I have narrowed the regression down to the following commit:
So it seems to be related to this pull request:
#6874
Here is what I did to support my claim:
The text was updated successfully, but these errors were encountered: