Skip to content
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

BUGFIX: The style deepObject together with a json payload confuses some generators and the swagger ui at times #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mficzel
Copy link
Member

@mficzel mficzel commented Jun 26, 2024

Since the deepObject style is not properly defined this change introduces a custom x-json style. This will not render the schema and style definitions and specify the payload via content.application/json.$ref which is at least sufficient for the swagger ui.

see: https://swagger.io/docs/specification/describing-parameters/#schema-vs-content

@mficzel mficzel force-pushed the bugfix/removeStyleAndSchemeFromJsonParameters branch from 9c71521 to 33cc5f5 Compare June 26, 2024 15:04
…some generators and the swagger ui at times

Since the deepobject style is not properly defined this change introdues a custom `x-json` style.  This will not render the `schema` and `style` definitions
and specify the payload via `content.application/json.$ref` which is at least sufficient for the swagger ui.
@mficzel mficzel force-pushed the bugfix/removeStyleAndSchemeFromJsonParameters branch from 33cc5f5 to 50a634d Compare June 26, 2024 15:06
@mficzel mficzel requested review from nezaniel and mwuest June 26, 2024 15:06
@mficzel
Copy link
Member Author

mficzel commented Jun 27, 2024

Also see related discussions in Swagger / OpenAPI:

Main takeaways:

  • Schema+Style should not be used at the same time as content as they mutually exclude each other
  • DeepObject is really not defined for nested items although the the style PHP uses in parse_str is quite common and referred to qs-style as is implemented by the common qs js library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant