Type Attribute Overrides #258
-
I am trying to get the type attribute overrides to work and it mentions the use of the annotation Where is that annotation implemented? The use of an object type with overrides using the annotation is very powerful but I am unable to track down the import to use it. https://victools.github.io/jsonschema-generator/#type-attribute-overrides Thanks for any help in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @dalucasPeraton, There was no particular annotation of that name. It is merely a fictional example to illustrate the use of those Type Attribute Overrides. @Retention(RetentionPolicy.RUNTIME)
@interface ValidOneOfTypes {
Class[] value();
}
Alternatively, you could use the jsonschema-module-swagger-2 and add the |
Beta Was this translation helpful? Give feedback.
Hi @dalucasPeraton,
There was no particular annotation of that name. It is merely a fictional example to illustrate the use of those Type Attribute Overrides.
You can create the annotation type yourself if you want to use it for such a scenario.
Alternatively, you could use the jsonschema-module-swagger-2 and add the
@Schema(anyOf = {String.class, Number.class})
annotation. That would be theio.swagger.v3.o…