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

OAS: Swagger editor may not pick up the correct media-type value #214

Closed
ostridm opened this issue Sep 20, 2023 · 0 comments · Fixed by #215
Closed

OAS: Swagger editor may not pick up the correct media-type value #214

ostridm opened this issue Sep 20, 2023 · 0 comments · Fixed by #215
Assignees
Labels
Type: bug Something isn't working.

Comments

@ostridm
Copy link
Contributor

ostridm commented Sep 20, 2023

The method OasV2ParameterObjectsParser.parseBodyParameter may not pick up the correct media-type value.

const mimeTypes = operationObject.consumes || ['application/json'];

The method should take into account least three cases:

  • root level consumes and no operation-level consumes
  • root level consumes overriding with non-empty operation-level consumes
  • root level consumes overriding with empty operation-level consumes; according to spec - "An empty value MAY be used to clear the global definition".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant