Externalized JSON schemas
JSON schemas authored within InsuranceSuite make use of a number of Guidewire-specific extensions. These extensions are especially prominent around composition and extension of schemas.
External systems naturally are not able to consume JSON schema documents directly as they are. The systems do not understand the particular properties in the schemas. To consume a JSON schema from another system, you must produce an externalized version of the schema that standard third-party tools can understand.
- Produces a combined version of the schema. In the combined version, all x-gw-combine statements have been processed.
- Inlines any imported schema definitions and rewrites $ref properties appropriately to point to the inlined definitions.
- Removes custom
x-gw-properties that are not relevant for downstream systems. - Completes a few other small transformations. Such transformations include adding enum to properties that specify x-gw-export-enumeration.
- Adds top-level properties to the schema to reference every definition. This addition is because many third-party tools expect that a schema to represent a single object definition. The third-party tools cannot produce generated classes for any embedded definitions that appear unreferenced.
Command-line tools
To generate the externalized schemas, run the genExternalSchemas build task. By default, the tool generates externalized versions of all defined schemas. However, you can use command-line arguments to generate specific schemas.
