-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
How to annotate an inline response? #3366
Comments
I don't believe we have a way to do that (but @frantuma may correct me). Why are you looking for an inline definition though? Generally speaking, referenced definitions are easier to manage, however, I'm curious to understand the use case. |
A third party specified an OAS3 interface which our product has to implement. The interface documentation (yaml) contains inline operation responses. |
Got it. So right now there's no simple way of doing this. You can manually describe the schema inside the To make it more automated, you can create another annotation that says it should be inline, and extend the Reader to process it that way. |
Okay, thank you for your suggestions. I will try the manual description. |
With springdoc-openapi my application generates OAS3 yaml specification based on the Swagger 3 annotations in the controllers and models.
What I want to achieve is to have an inline operation response. Something like this:
The annotations of the operation method in the controller class looks like this:
and MyResponseDTO:
This results in a schema with:
The response content is a reference instead of an inline object. Is there a way I can annotate the response/schema so that it will appear inline in the documentation?
I already posted this question as an issue for the springdoc-openapi. They however advised me to ask the question here.
So maybe someone here can help me out? Thanks!
Ramon Rockx
The text was updated successfully, but these errors were encountered: