The Swagger Schema Items object

The Schema Items object provides the array members for the items property on the Response Schema object. The type property on the Response Schema object specifies the type of response body. If the value of the type property on the Response Schema object is array, then the items property on the Response Schema object must point to a Schema Items object that specifies the array members.

Optional properties

Property Type Description Combination style
$ref string

Provides a link to the JSON schema definition defined the file imported as alias using property x-gw-schema-import. Set this property in cases in which the API returns a top-level JSON array of data.

For example, suppose the following circumstances exist:
  • The response schema has the following values set: type=array and $ref=contact#/definitions/Contact.
  • The API handler method returns an Iterable<JsonObject>
In this case, PolicyCenter serializes the Iterable object as a JSON array, in which each array element is an object serialized and validated according to the Contact JSON Schema.
N/A
enum anyType[] Documentation only. The enum values must be valid values of the type defined by the combination of type, format, and x-gw-type. N/A
format string

Use only if the type property is a scalar type. The combination of type, format, and x-gw-type determines how PolicyCenter serializes scalar values returned by the API handler.

N/A
type string

Do not set this property if you set a value for $ref, unless the value of $ref is object. The combination of type, format, and x-gw-type determines how PolicyCenter serializes scalar values returned by the API handler.

Valid values are:
  • boolean
  • integer
  • number
  • object
  • string
N/A

Guidewire extension properties

Property Type Description Combination style
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.

N/A
x-gw-type string

Use only if the type property is a scalar type.

The combination of type, format, and x-gw-type determines how PolicyCenter serializes scalar values returned by the API handler.

N/A