Support defining "additionalProperties" in @Schema annotation
See original GitHub issueWith #360 support was added for properties
, but I can’t find any support for additonalProperties
(see https://swagger.io/docs/specification/data-models/dictionaries/). AFAICT it looks like the model does support additional properties (see also #100), but I cannot find anything in the @Schema
annotation.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Schema (swagger-annotations 2.1.12 API)
The annotation may be used to define a Schema for a set of elements of the OpenAPI spec, and/or to define additional properties...
Read more >How to add Properties[] properties in @Schema annotation?
I am not sure how to define the schemas for the Properties in my request parameter schema. Or if a schema is even...
Read more >Adding additional properties in Swagger - java - Stack Overflow
I am integrating Swagger into my project. I use springfox and open-api 3.0.3. I want to add field additional items for arrays and...
Read more >Schema in a response allows additional properties
The schema you have defined allows additional properties, ... However, OAS v2 does support using additionalProperties to specify a schema to which the ......
Read more >jsonschema2pojo
Generate Plain Old Java Objects from JSON or JSON-Schema. ... the boolean value false , then the generated Java type does not support...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@flo-ryan , you’re right - I was just spit balling that answer and it turns out not to work (at least in SmallRye). You might try to put a dummy
@Path
that returns the Map type you require, then use theOASFilter
to re-work the output. Obviously this is a hack.Longer term for the next release (2.1?), perhaps
@Schema
could be extended with these?Class<?> additionalProperties() default Void.class;
boolean additionalPropertiesAllowed() default false;
Any thoughts on this, @EricWittmann, @phillip-kruger, @msmiths ?
Hi guys, we are also in need to have the support of additionalProperties: true in the Schema annotation. Do we have any plan recently for adding this? Thank you.