@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 |
---|---|
String |
description
Provide a longer description of the class.
|
String |
discriminator
Supports model inheritance and polymorphism.
|
Class<?> |
parent
Provide a superclass for the model to allow describing inheritance.
|
String |
reference
Specifies a reference to the corresponding type definition, overrides any other metadata specified
|
Class<?>[] |
subTypes
An array of the sub types inheriting from this model.
|
String |
value
Provide an alternative name for the model.
|
public abstract String value
By default, the class name is used.
public abstract String description
public abstract Class<?> parent
public abstract 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.
public abstract Class<?>[] subTypes
public abstract String reference
Copyright © 2015. All Rights Reserved.