Working with JSON files

Use a JSON schema to define your REST API inputs and outputs. A JSON schema consists of a set of definitions, with each definition corresponding to a logical type, which maps to a possible JSON object. These definitions themselves have properties, which define the set of properties allowed on that object. Properties can be either simple scalar values, references to other definitions, or arrays of scalars or objects.

In practice, Guidewire supports a subset of the JSON schema, draft 4 specification. The subset of the JSON schema that Guidewire defines is almost identical to the subset of the JSON schema that one can use in Swagger declarations. However, there are a few items that the Swagger specification defines that Guidewire does not support. In InsuranceSuite, the REST API framework and the Integration Views framework share the JSON schema files. Both of these frameworks makes use of the same files, with the same rules, and both frameworks support the same subset of the JSON schema.

Naming JSON schema files

As with Swagger schemas, each JSON schema file defines its own namespace and version. JSON schema files have the following characteristics:
  • Contain JSON code
  • Have an ending suffix of .schema.json
Guidewire stores JSON schemas in the following location in Guidewire Studio:
  • configuration > config > integration > schemas
Guidewire recommends that you create a sub-folder under the schemas folder using your company name to store your JSON files. For example, suppose that you create a JSON schema file named contact-1.0.schema.json. You then store this file in the following location in Studio:
  • configuration > config > integration > schemas > mycompany

The fully qualified name of the JSON schema file becomes mycompany.contact-1.0.

Guidewire JSON specification

See the PolicyCenter Integration Guide for details of the Guidewire JSON specification.

JSON scheme documentation

Refer to the following web site to view the full JSON schema documentation: