Releasing schemas
A publisher of an API for external consumption might want to ensure against the accidental deployment of changes into production environments. This aim would especially apply to changes that modify a JSON or Swagger schema unintentionally. In order to detect API changes, Guidewire InsuranceSuite allows you to mark a given schema as released. This marking means that you do not expect further changes to a schema version.
Marking a schema as released causes PolicyCenter to generate a checksum for the schema under config/integration/schemas/versions.json. Suppose a schema file is loaded at runtime and versions.json lists the schema file. In this case, the system generates a checksum for the schema and compares the checksum against a checksum for the stored version. If the schema version does not match and the server is in production mode, the server does not start. Otherwise, PolicyCenter logs an error message.
Excluded properties
The hashing algorithm for schema files removes documentation-only properties.
For a JSON schema, this removal applies to the description property. For
a Swagger schema, the hashing also excludes info,
description, summary, example,
and externalDocs properties. In addition, the order of properties within
a given object does not affect the resulting hash.
Releasing a schema
gwb updateReleasedSchemaVersions --module configuration --schemaType schema --versions
gw.pc.activities.activities-1.0This code adds the activities-1.0 JSON schema from the pc module.
