-
Notifications
You must be signed in to change notification settings - Fork 2.2k
How to use @Schema with Properties for OAS? No examples, which annotation to use? #3547
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
Comments
there is a class ref as param everywhere , but as soon as I put my Response class it just adds component ref, how is this supposed to work? The response in question is very simple and contains single property, I don't want reusable component for a response type used single time. |
With the new Schema().type("object")
.addProperties("prop1",
new Schema().type("string"))
.addProperties("prop2",
new Schema().type("boolean")); Apparently there's no way to achieve the same with the related We need to be able to define (nested) properties in |
This is becoming severe issue to stop using Swagger via java and spring openspec together, because there is no escape route for things which hard to represent with autogeneration. How to use this raw code in @RestController ? |
I'm running into the same issue and just want to add documentation to properties of a request model class. |
How to represent properties in the link below?
https://swagger.io/docs/specification/data-models/data-types/#object
I am looking through openspec java annotations , nothing to help with properties, totally lost, what I am supposed to do here?
responses = {@ApiResponse( description = "Accepted", content = @Content(mediaType = "application/json", schema = @Schema(type = "object", properties = THIS_PROPERTIES_PROPERTY_IS_MISSING )))}
The text was updated successfully, but these errors were encountered: