Differences in the configuration work
For the most part, the configuration work required for general policy descendant endpoints is the same as for standard endpoints. However, there are minor differences in the required configuration work. They are detailed in the following sections.
Schema configuration
Cloud API uses a single set of schema, mapping, and updater files for both verified and unverified policies. The REST endpoint generator adds a minimal set of properties to these files. If there are additional fields on the policy descendant that need to be exposed to Cloud API, you must configure the schema, mapping, and updater files. For more information on how to do this, see Endpoint architecture.
Verified resource impl files
The verified element resource fileIn this file, no delete
method gets generated. This is because, for
verified policies, you cannot delete policy descendants.
In this file, no createMinimalChildElement
method gets generated.
This is because you cannot create descendants on a verified policy.
Unverified resource impl files
The unverified element resource file
In this file, no delete
method gets generated. This is because, as
of this release, Cloud API does not support deleting policy descendants for
unverified policies.
The unverified collection resource file
In this file, there is an additional Policy
getter. This method must
be modified so that it contains the path from the resource to the
Policy
entity.
For example, suppose that you create a custom policy descendant named
CustomEndorsement_Ext
. This entity has a foreign key named
Policy
that points to the policy. When you generate endpoints
for CustomEndorsement_Ext
, the
UnverifiedCustomEndorsementsExtResources.gs class has a
Policy
getter. It would need to be set to the following:
private property get Policy() : Policy {
return (this.Parent.Element.Policy)
}
}
The apiconfig file
The generator adds two entries to the apiconfig file, one for the verified collection resource and one for the unverified collection resource. Guidewire recommends adding a default sort order to each resource. For more information, see Configuring the apiconfig file.
Authorization files
The REST endpoint generator adds entries to the relevant role.yaml
files and the resource access files for both the verified and unverified resources.
Each set must be configured as needed. For more information, see Configuring authorization for generated endpoints.