Annotation Type DiscriminatorMapping
-
@Target({}) @Retention(RUNTIME) @Inherited public @interface DiscriminatorMapping
The annotation may be used inSchema.discriminatorMapping()
to define an optional mapping definition in scenarios involving composition / inheritance where the value of the discriminator field does not match the schema name or implicit mapping is not possible.Use
Schema.discriminatorProperty()
to define a discriminator property.
-
-
Element Detail
-
value
String value
The property value that will be mapped to a Schema- Returns:
- the property value
- Default:
- ""
-
-
-
schema
Class<?> schema
The schema that is being mapped to a property value- Returns:
- the Schema reference
- Default:
- java.lang.Void.class
-
-
-
extensions
Extension[] extensions
The list of optional extensions- Returns:
- an optional array of extensions
- Since:
- 2.2.12 / OpenAPI 3.1
- Default:
- {}
-
-