The Swagger Schema object

The Schema object allows for the definition of input and output data types. These types can be objects, but also primitives and arrays. Guidewire does not allow inline schema definitions. Thus, only the following properties are valid. You must specify at least one of these properties if you use this object.

Property Type Description Combination style
$ref string
Required if type not specified. Provides a link to the JSON schema definition defined 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:
  • contact#/definitions/Contact

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

If the operation consumes the 'application/json' media type, PolicyCenter uses this schema to validate the incoming data.

If the API handler method takes a JsonObject object or JsonWrapper object as the body argument, the operation requires the $ref property and PolicyCenter uses the referenced schema to deserialize the input data.

The string must be one of the following formats:
  • alias#/definitions/name
N/A
type string
Required if $ref not specified. Defines the base JSON type for the schema. The type value must be one of the following:
  • array
  • boolean
  • integer
  • number
  • string
N/A