Class Items
The Items Object is a limited subset of JSON-Schema's items object. It is used by parameter definitions that are not located in "body" to describe the type of items in an array. This is particularly useful for query parameters, path parameters, and header parameters that accept arrays.
OpenAPI Specification:
The Items Object supports the following fields from JSON Schema:
- type (string, REQUIRED) - The data type. Values:- "string" ,- "number" ,- "integer" ,- "boolean" ,- "array" 
- format (string) - The format modifier (e.g.,- "int32" ,- "int64" ,- "float" ,- "double" ,- "date" ,- "date-time" )
- items (- Items) - Required if type is- "array" . Describes the type of items in the array
- collectionFormat (string) - How multiple values are formatted. Values:- "csv" ,- "ssv" ,- "tsv" ,- "pipes" ,- "multi" 
- default (any) - The default value
- maximum (number),- exclusiveMaximum (boolean),- minimum (number),- exclusiveMinimum (boolean) - Numeric constraints
- maxLength (integer),- minLength (integer),- pattern (string) - String constraints
- maxItems (integer),- minItems (integer),- uniqueItems (boolean) - Array constraints
- enum (array) - Possible values for this item
- multipleOf (number) - Must be a multiple of this value
Example:
   
   
See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAdds one or more values to theenum property.copy()Make a deep copy of this object.<T> TGeneric property getter.Bean property getter:collectionFormat .Bean property getter:default .getEnum()Bean property getter:enum .Bean property getter:exclusiveMaximum .Bean property getter:exclusiveMinimum .Bean property getter:format .getItems()Bean property getter:items .Bean property getter:maximum .Bean property getter:maxItems .Bean property getter:maxLength .Bean property getter:minimum .Bean property getter:minItems .Bean property getter:minLength .Bean property getter:multipleOf .Bean property getter:pattern .getRef()Bean property getter:$ref .getType()Bean property getter:type .Bean property getter:uniqueItems .keySet()Returns all the keys on this element.resolveRefs(OpenApi openApi, Deque<String> refStack, int maxDepth) Resolves any"$ref" attributes in this element.Generic property setter.setCollectionFormat(String value) Bean property setter:collectionFormat .setDefault(Object value) Bean property setter:default .Adds one or more values to theenum property.setEnum(Collection<Object> value) Bean property setter:enum .setExclusiveMaximum(Boolean value) Bean property setter:exclusiveMaximum .setExclusiveMinimum(Boolean value) Bean property setter:exclusiveMinimum .Bean property setter:format .Bean property setter:items .setMaximum(Number value) Bean property setter:maximum .setMaxItems(Integer value) Bean property setter:maxItems .setMaxLength(Integer value) Bean property setter:maxLength .setMinimum(Number value) Bean property setter:minimum .setMinItems(Integer value) Bean property setter:minItems .setMinLength(Integer value) Bean property setter:minLength .setMultipleOf(Number value) Bean property setter:multipleOf .setPattern(String value) Bean property setter:pattern .Bean property setter:$ref .Bean property setter:type .setUniqueItems(Boolean value) Bean property setter:uniqueItems .protected Itemsstrict()Sets strict mode on this bean.Sets strict mode on this bean.
- 
Constructor Details- 
Itemspublic Items()Default constructor.
- 
ItemsCopy constructor.- Parameters:
- copyFrom- The object to copy.
 
 
- 
- 
Method Details- 
copyMake a deep copy of this object.- Returns:
- A deep copy of this object.
 
- 
strictDescription copied from class:OpenApiElementSets strict mode on this bean.- Overrides:
- strictin class- OpenApiElement
- Returns:
- This object
 
- 
strictDescription copied from class:OpenApiElementSets strict mode on this bean.- Overrides:
- strictin class- OpenApiElement
- Parameters:
- value- The new value for this property.
 Non-boolean values will be converted to boolean using- Boolean..- valueOf (value.toString())
 Can be- null (interpreted as- false ).
- Returns:
- This object
 
- 
getTypeBean property getter:type .The internal type of the array. - Returns:
- The property value, or null if it is not set.
 
- 
setTypeBean property setter:type .The internal type of the array. - Parameters:
- value- The new value for this property.
 Valid values:- "string" 
- "number" 
- "integer" 
- "boolean" 
- "array" 
 
 Property value is required.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getFormatBean property getter:format .The extending format for the previously mentioned type.- Returns:
- The property value, or null if it is not set.
 
- 
setFormatBean property setter:format .The extending format for the previously mentioned type.- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getItemsBean property getter:items .Describes the type of items in the array. - Returns:
- The property value, or null if it is not set.
 
- 
setItemsBean property setter:items .Describes the type of items in the array. - Parameters:
- value- The new value for this property.
 Property value is required if- typeis- "array" .
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getCollectionFormatBean property getter:collectionFormat .Determines the format of the array if type array is used. - Returns:
- The property value, or null if it is not set.
 
- 
setCollectionFormatBean property setter:collectionFormat .Determines the format of the array if type array is used. - Parameters:
- value- The new value for this property.
 Valid values:- "csv" (default) - comma separated values- foo,bar.
- "ssv" - space separated values- foo bar.
- "tsv" - tab separated values- foo\tbar.
- "pipes" - pipe separated values- foo|bar.
 
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getDefaultBean property getter:default .Declares the value of the item that the server will use if none is provided. Notes:- 
      "default" has no meaning for required items.
- 
      Unlike JSON Schema this value MUST conform to the defined typefor the data type.
 - Returns:
- The property value, or null if it is not set.
 
- 
      
- 
setDefaultBean property setter:default .Declares the value of the item that the server will use if none is provided. Notes:- 
      "default" has no meaning for required items.
- 
      Unlike JSON Schema this value MUST conform to the defined typefor the data type.
 - Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
      
- 
getMaximumBean property getter:maximum .- Returns:
- The property value, or null if it is not set.
 
- 
setMaximumBean property setter:maximum .- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getExclusiveMaximumBean property getter:exclusiveMaximum .- Returns:
- The property value, or null if it is not set.
 
- 
setExclusiveMaximumBean property setter:exclusiveMaximum .- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getMinimumBean property getter:minimum .- Returns:
- The property value, or null if it is not set.
 
- 
setMinimumBean property setter:minimum .- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getExclusiveMinimumBean property getter:exclusiveMinimum .- Returns:
- The property value, or null if it is not set.
 
- 
setExclusiveMinimumBean property setter:exclusiveMinimum .- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getMaxLengthBean property getter:maxLength .- Returns:
- The property value, or null if it is not set.
 
- 
setMaxLengthBean property setter:maxLength .- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getMinLengthBean property getter:minLength .- Returns:
- The property value, or null if it is not set.
 
- 
setMinLengthBean property setter:minLength .- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getPatternBean property getter:pattern .- Returns:
- The property value, or null if it is not set.
 
- 
setPatternBean property setter:pattern .This string SHOULD be a valid regular expression. - Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getMaxItemsBean property getter:maxItems .- Returns:
- The property value, or null if it is not set.
 
- 
setMaxItemsBean property setter:maxItems .- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getMinItemsBean property getter:minItems .- Returns:
- The property value, or null if it is not set.
 
- 
setMinItemsBean property setter:minItems .- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getUniqueItemsBean property getter:uniqueItems .- Returns:
- The property value, or null if it is not set.
 
- 
setUniqueItemsBean property setter:uniqueItems .- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getEnumBean property getter:enum .- Returns:
- The property value, or null if it is not set.
 
- 
setEnumBean property setter:enum .- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
addEnumAdds one or more values to theenum property.- Parameters:
- values- The values to add to this property.
 Ignored if- null .
- Returns:
- This object
 
- 
setEnumAdds one or more values to theenum property.- Parameters:
- values- The values to add to this property.
 Valid types:- Object
- Collection<Object>
- String- JSON array representation of- Collection<Object>- Example:- _enum( - "['foo','bar']" );
- String- Individual values- Example:- _enum( - "foo" ,- "bar" );
 
 Ignored if- null .
- Returns:
- This object
 
- 
getMultipleOfBean property getter:multipleOf .- Returns:
- The property value, or null if it is not set.
 
- 
setMultipleOfBean property setter:multipleOf .- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getRefBean property getter:$ref .- Returns:
- The property value, or null if it is not set.
 
- 
setRefBean property setter:$ref .- Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object
 
- 
getDescription copied from class:OpenApiElementGeneric property getter.Can be used to retrieve non-standard Swagger fields such as "$ref" .- Overrides:
- getin class- OpenApiElement
- 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.
 
- 
setDescription copied from class:OpenApiElementGeneric property setter.Can be used to set non-standard Swagger fields such as "$ref" .- Overrides:
- setin class- OpenApiElement
- Parameters:
- property- The property name to set. Must not be- null .
- value- The new value for the property.
- Returns:
- This object
 
- 
keySetDescription copied from class:OpenApiElementReturns all the keys on this element.- Overrides:
- keySetin class- OpenApiElement
- Returns:
- All the keys on this element.
   
 Nevernull .
 
- 
resolveRefsResolves any"$ref" attributes in this element.- Parameters:
- openApi- The swagger document containing the definitions.
- refStack- Keeps track of previously-visited references so that we don't cause recursive loops.
- maxDepth- The maximum depth to resolve references.
 After that level is reached,- $refreferences will be left alone.
 Useful if you have very complex models and you don't want your swagger page to be overly-complex.
- Returns:
- This object with references resolved.
   
 May or may not be the same object.
 
 
-