The Swagger Response Schema object

The Response Schema object defines a link to a JSON schema definition.

Required properties

Property Type Description Merge style
items Schema items object

Required if value of type property is array. Otherwise, do not use.

If you set the value of the type property to array, then you must also set the items property to point to a Schema Items object that contains the actual members of the array.

N/A

Optional properties

Property Type Description Combination style
$ref string
Provides a link to the JSON schema definition defined in the file imported as alias using property x-gw-schema-import. For example, suppose that x-gw-schema-import contains the following key/value pair:
  • contact : gw.pl.contact-1.0
Then, the $ref reference string becomes the following string:
  • contact#/definitions/Contact

In this string, Contact references the definition defined in the gw.pl.contact-1.0 JSON schema.

PolicyCenter then uses the referenced schema to drive the serialization and validation of any JSON and XML types returned the API handler method.

Use the following format for the string value:
  • alias#/definitions/name
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
Specifies the type of the response body. Valid values are:
  • array
  • boolean
  • integer
  • number
  • object
  • string

Only set this property to object if property $ref is also set to a value. If you set this value to Array, then you must also specify a value for the items property.

For any other allowed value, the combination of type, format, and x-gw-type determines how PolicyCenter serializes scalar values returned by the API handler method.

For example, if type=string and format=date-time, then PolicyCenter serializes a java.util.Date object returned by the API handler method as an ISO 8601 Date.

N/A

Guidewire extension properties

Property Type Description Merge 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