Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Ignore Content-Type parameters #658

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

Closed
dbanty opened this issue Aug 21, 2022 · 1 comment
Closed

Ignore Content-Type parameters #658

dbanty opened this issue Aug 21, 2022 · 1 comment
Labels
✨ enhancement New feature or improvement

Comments

@dbanty
Copy link
Collaborator

dbanty commented Aug 21, 2022

Is your feature request related to a problem? Please describe.

RFC2616 allows parameters to content-types, for example application/json; version=2.3.5 is a valid content type that should be treated like application/json. Currently this is not supported by this project.

Describe the solution you'd like

Ignore any parameters (things including and after ;) in the content type.

Describe alternatives you've considered

Using #657.

Additional context

#655

@dbanty dbanty added the ✨ enhancement New feature or improvement label Aug 21, 2022
@rafalkrupinski
Copy link

rafalkrupinski commented Aug 22, 2022

On another thought, can the parameters be used as a discriminator? I mean is it valid OpenAPI with multiple responses for the same path, method and content type differing only with a parameter?

path:
   /path:
      get:
        responses:
          '200':
            content:
              application/json; version=2.3.5:
                schema:
                  $ref: '#/components/schemas/Model23'
              application/json; version=2.4.0:
                schema:
                  $ref: '#/components/schemas/Model24'

I guess the parameters should only be ignored only when selecting a decoder, and even then, maybe use the encoding param

@openapi-generators openapi-generators locked and limited conversation to collaborators Aug 13, 2023
@dbanty dbanty converted this issue into discussion #809 Aug 13, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
✨ enhancement New feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants