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

[Feature request] Add support for the "default" response type #7

Closed
SudoHenk opened this issue Jan 18, 2023 · 1 comment
Closed

[Feature request] Add support for the "default" response type #7

SudoHenk opened this issue Jan 18, 2023 · 1 comment

Comments

@SudoHenk
Copy link

SudoHenk commented Jan 18, 2023

I'm currently generating an OpenAPI specification with the help of Apache CXF OpenAPI. This returns by default the following response object:

"responses" : {
          "default" : {
            "description" : "default response",
            "content" : {
              "application/json; charset=UTF-8" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MyCustomDTO"
                }
              }
            }
          }
        }

I noticed that the generator only looks for the "200" response type, would it be possible to also add the "default" response type as a return type?

And another thing I noticed, is that the content./ wildcard is not working, I'm currently using a "application/json; charset=UTF-8" content type due to some special characters, but the wildcard is not catching this content type AFAIK.

@teobler
Copy link
Owner

teobler commented Feb 8, 2023

  1. As describing responses mentioned, default response should used to describe default error like an error boundary, but I can also add it for you, its just a small adding.
  2. media type '/' is not a wildcard in the code, it is just a specific type '/', since this is for my own project 😆 , I can also add your specific media type

teobler added a commit that referenced this issue Feb 8, 2023
@teobler teobler closed this as completed Feb 11, 2023
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

No branches or pull requests

2 participants