public abstract class SwaggerElement extends Object
Constructor and Description |
---|
SwaggerElement() |
Modifier and Type | Method and Description |
---|---|
<T> T |
get(String property,
Class<T> type)
Generic property getter.
|
Map<String,Object> |
getExtraProperties()
The map used to store 'extra' properties on the swagger element.
|
protected boolean |
isStrict()
Returns
|
SwaggerElement |
set(String property,
Object value)
Generic property setter.
|
protected SwaggerElement |
strict()
Sets strict mode on this bean.
|
protected SwaggerElement |
strict(Object value)
Sets strict mode on this bean.
|
String |
toString() |
public SwaggerElement()
protected boolean isStrict()
protected SwaggerElement strict()
protected SwaggerElement strict(Object value)
value
- The new value for this property.
Boolean.valueOf (value.toString())
.
@BeanProperty(value="*") public Map<String,Object> getExtraProperties()
For example, the
This map allows you to store such properties.
This map is lazy-created once this method is called.
LinkedHashMap
.public <T> T get(String property, Class<T> type)
Can be used to retrieve non-standard Swagger fields such as
property
- The property name to retrieve.type
- The datatype to cast the value to.public SwaggerElement set(String property, Object value)
Can be used to set non-standard Swagger fields such as
property
- The property name to set.value
- The new value for the property.Copyright © 2018 Apache. All rights reserved.