-
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
Document Hashmap with @Schema #3080
Comments
one way to achieve what you want is having your resource method return e.g.
a more "invasive" alternative would be defining a class extending e.g.
|
It seems like something that should be automatically introspected and applied, especially for |
Something like this would be great:
And so would produce the following in swagger ui:
|
Hi! @frantuma How's the progress with this one? |
Hello @frantuma, is there any update on this? It seems bizarre that describing an API response using a map isn't natively supported the same way that Schema or ArraySchema are. The current solutions that you've shown above lead to bad practices |
Any update on this? @frantuma |
I also faced this limitation today, Does anyone know the status on this? |
Hey @frantuma , any update on this one? Thanks! |
Also looking for an update on this @frantuma |
#4475 adds support for Closing ticket, will monitor for any comment/feedback |
Is there somewhere an example on how a map should be described based on the new changes? |
I am still not seeing how this can be used to document a Map (key type, value type) using the provided examples. It should be much more obvious. |
hi,
how would one describe an api response, that returns
Map<String, List<ComplexObject>>
using the v2 annotations? OrMap<String, ComplexObject>
?According to OA3 schema it is possible to model like this, using additionalProperties:
But I do not see a way, how to describe this structure on the server side using java annotations, as
@Schema
does not haveadditionalProperties
.(end goal is to generate schema from server code, or at least to validate, that the server code matches the schema above)
Thanks
The text was updated successfully, but these errors were encountered: