@Target(value=TYPE)
@Retention(value=RUNTIME)
@Inherited
public @interface ApiModel
Classes will be introspected automatically as they are used as types in operations, but you may want to manipulate the structure of the models.
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
description
Provide a longer description of the class.
|
java.lang.String |
discriminator
Supports model inheritance and polymorphism.
|
java.lang.Class<?> |
parent
Provide a superclass for the model to allow describing inheritance.
|
java.lang.String |
reference
Specifies a reference to the corresponding type definition, overrides any other metadata specified
|
java.lang.Class<?>[] |
subTypes
An array of the sub types inheriting from this model.
|
java.lang.String |
value
Provide an alternative name for the model.
|
public abstract java.lang.String value
By default, the class name is used.
public abstract java.lang.String description
public abstract java.lang.Class<?> parent
public abstract java.lang.String discriminator
This is the name of the field used as a discriminator. Based on this field, it would be possible to assert which sub type needs to be used.
Copyright © 2018. All Rights Reserved.