Package org.apache.juneau.dto.swagger
Class SwaggerElement
java.lang.Object
org.apache.juneau.dto.swagger.SwaggerElement
- Direct Known Subclasses:
Contact
,ExternalDocumentation
,HeaderInfo
,Info
,Items
,License
,Operation
,ParameterInfo
,ResponseInfo
,SchemaInfo
,SecurityScheme
,Swagger
,Tag
,Xml
Root class for all Swagger beans.
See Also:
-
Method Summary
Modifier and TypeMethodDescriptionasMap()
Returns a copy of this swagger element as a modifiable map.Generic property keyset.Generic property getter.<T> T
Generic property getter.protected boolean
isStrict()
Returnstrue if contents should be validated per the Swagger spec.keySet()
Returns all the keys on this element.Generic property setter.protected SwaggerElement
strict()
Sets strict mode on this bean.protected SwaggerElement
Sets strict mode on this bean.toString()
-
Method Details
-
isStrict
Returnstrue if contents should be validated per the Swagger spec.- Returns:
true if contents should be validated per the Swagger spec.
-
strict
Sets strict mode on this bean.- Returns:
- This object.
-
strict
Sets strict mode on this bean.- Parameters:
value
- The new value for this property.
Non-boolean values will be converted to boolean usingBoolean.
.valueOf (value.toString())
Can benull (interpreted asfalse ).- Returns:
- This object.
-
get
Generic property getter.Can be used to retrieve non-standard Swagger fields such as
"$ref" .- Type Parameters:
T
- The datatype to cast the value to.- Parameters:
property
- The property name to retrieve.type
- The datatype to cast the value to.- Returns:
- The property value, or
null if the property does not exist or is not set.
-
get
Generic property getter.Can be used to retrieve non-standard Swagger fields such as
"$ref" .- Parameters:
property
- The property name to retrieve.- Returns:
- The property value, or
null if the property does not exist or is not set.
-
set
Generic property setter.Can be used to set non-standard Swagger fields such as
"$ref" .- Parameters:
property
- The property name to set.value
- The new value for the property.- Returns:
- This object.
-
extraKeys
Generic property keyset.- Returns:
- All the non-standard keys on this element.
Nevernull .
-
keySet
Returns all the keys on this element.- Returns:
- All the keys on this element.
Nevernull .
-
asMap
Returns a copy of this swagger element as a modifiable map.Each call produces a new map.
- Returns:
- A map containing all the values in this swagger element.
-
toString
-