The Swagger Items object

The Items object provides a limited subset of the properties on the JSON schema Items object. Parameter definitions that do not have an in property of body use this object. Guidewire does not support the following properties from the Swagger 2.0 specification on the Items object:
  • collectionFormat
  • default
  • items
  • minItems
  • maxItems
  • uniqueItems

Guidewire specifically does not support nested arrays for parameter types.

Required properties

Property Type Description Combination style
type string

Required. Defines the base JSON type for the items. The combination of type, format, and x-gw-type determines how PolicyCenter deserializes the data into a Java object at runtime.

The value must be one of the following:
  • boolean
  • integer
  • number
  • string
First non-null

Optional properties

Property Type Description Combination style
enum any[]

Specifies a list of values that the input must match. PolicyCenter turns the enum values in the schema into Java objects at runtime. It then compares these values against the input values using equals and hashCode methods.

Each element of the array must be a JSON value that PolicyCenter can parse based on the type, format, and x-gw-type values of the item.

First non-null
exclusiveMaximum boolean

Determines if PolicyCenter treats the maximum value as inclusive or exclusive for purposes of comparison between two values.

Only set a value for this property if you also specify a value for the maximum property as well.

First non-null
exclusiveMinimum boolean

Determines if PolicyCenter treats the minimum value of this property as inclusive or exclusive for purposes of comparison between two values.

The default value is false, which means that PolicyCenter treats the value as inclusive. Only set a value for this property if you also specify a value for the minimum property as well.

First non-null
format string

Defines the base JSON type format for the parameter. The combination of the type, format, and x-gw-type properties determines how PolicyCenter deserializes the data into a Java object at runtime.

First non-null
maximum number

Specifies the maximum numeric value allowed for an item. PolicyCenter parses this value as a fixed-point value, with no loss of precision. PolicyCenter then converts the value to an internal Java representation for the purpose of comparison at runtime.

The comparison is either inclusive or exclusive of the maximum value, depending upon the value of the exclusiveMaximum property.

Example 1. If the parameter has a type value of integer and a format value of int32, the maximum value must be a valid integer. At runtime, PolicyCenter converts the value to an integer value.

Example 2. If the parameter has a type value of string and a format value of gw-bigdecimal, PolicyCenter converts the value to BigDecimal at runtime.

Only set a value for this property if the parameter's runtime type is a numeric type.

First non-null
maxLength integer

Determines the maximum length of the property value, inclusive. Only set a value for the maxLength property if the runtime type is string. If specified, the value cannot be a negative number.

First non-null
minimum number

Specifies the minimum numeric value allowed for an item. PolicyCenter parses this value as a fixed-point value, with no loss of precision. PolicyCenter then converts the value to an internal Java representation for the purpose of comparison at runtime.

The comparison is either inclusive or exclusive of the minimum value, depending upon the value of the exclusiveMinimum property.

This property operates in an analogous manner to the maximum property.

Only set a value for this property if the parameter's runtime type is a numeric type.

First non-null
minLength integer

Determines the minimum length of the property value, inclusive. Only set a value for the minLength property if the runtime type is string. If specified, the value cannot be a negative number.

First non-null
multipleOf number

Specifies that the parameter value must be a multiple of the value of this parameter. PolicyCenter parses this value as a fixed-point value, with no loss of precision. PolicyCenter then converts the value to an internal Java representation for the purpose of comparison at runtime.

Set a value for this property only if the runtime type of the item is a numeric type.

First non-null
pattern string

Specifies a regular expression that the input must match. PolicyCenter does not explicitly anchor the regular expression by default. If you want the regular expression to match the entire input string, then you need to explicitly anchor the expression with ^ and $.

PolicyCenter evaluates the pattern string using the Java regular expression engine. Thus, the regular expression must match the Java syntax. The Java syntax can have some minor differences from the JavaScript syntax, and, therefore, represent a slight deviation from the Swagger specification.

Only set a value for the pattern property if the parameter has a runtime type of string.

First non-null

Guidewire extension properties

Property Type Description Combination style
x-gw-type string

Defines the base JSON type for the parameter. The combination of type, format, and x-gw-type determines how PolicyCenter deserializes the data into a Java object at runtime.

Do not specify this value for parameters of type body.

First non-null
x-gw-export-enumeration boolean

If set to true, PolicyCenter writes out the typekey values as an enum property while creating the Swagger schema for external clients. A value of true is only valid if the enum property is not set and x-gw-type is a typekey type.

The default is false.

First non-null
x-gw-extensions map<string, any>

The values in x-gw-extensions are available to the IRestValidatorFactoryPlugin plugin if you invoke the plugin to create custom validators for this parameter.

This value can be an arbitrary map of property keys to values. The key values can be any string, and the object values can be any object, including nested JSON objects.

Merge of extensions