Adding scalar properties in Cloud API

Extension files

Every API in Cloud API has a set of three extension files that are used to extend resources used by the endpoints in that API. This includes:

  • A schema extension file, where you can define new properties for a resource
  • A mapper extension file, where you can define how data from the database is used to populate extension fields
  • An updater extension file, where you can define how data from extension fields is written to the database

The names of the extension files are defined in the table below. Note that the file name always starts with the API name. For example, the schema extension file for the Common API is common_ext-1.0.schema.json.

Filename Guidewire Studio node
<API>_ext-1.​0.​schema.​json integration -> schemas -> ext -> <API>.​v1
<API>_ext-1.​0.​mapping.​json integration -> mappers -> ext -> <API>.​v1
<API>_ext-1.​0.​updater.​json integration -> updaters -> ext -> <API>.​v1

Required file modifications

A scalar is a single simple value, such as a string, number, datetime, or Boolean.

To add a scalar property to a resource, you must modify the schema, mapping, and updater file for the API that contains the endpoints that use the schema. For example, suppose you want to add an extension property for the User schema. This schema is used by endpoints in the Common API. Therefore, you need to modify the following files:

  • common_ext-1.0.schema.json
  • common_ext-1.0.mapping.json
  • common_ext-1.0.updater.json