The REST endpoint generator prompts

The following section lists the prompts for the general case of generating endpoints for a generic child resource. All responses are case-sensitive.

Which data model entity would you like to generate endpoints for?

Specify the custom entity name.

If the specified entity has a name that does not start or end with "Ext", then an additional prompt identifies that "Ext" will be added to the resource name. You must acknowledge this by entering "y". If you do not enter "y", the generator throws an illegal state exception and stops running.

The default plural for this entity is <defaultValue>. If you want to use a different plural, 
specify it and press Enter. To accept the default, just press Enter.

Specify a custom name for the collection resource, or press Enter to accept the default name.

Which API should the endpoints be added to?

Specify the API name. The technical name is specified in lower case, such as "common" for the Common API or "admin" for the Admin API.

You cannot add endpoints to the Composite API or the Test Util API.

Is the <CustomEntity> entity at the root of the endpoint path (GET /activities)? 
(y = yes; n = no, it is a child of some other entity (GET /activities/{activityId}/notes))

Enter "n" to make the custom resource a child of some existing parent resource.

Enter "n" to make the custom resource a child of some existing parent resource. (This prompt is not presented for effective-dated entities. Effective-dated entities cannot be root resources.)

What is the resource name of the parent?
Enter the resource name of the parent.
  • This is the value of the resourceType from the parent resource's schema.
  • This must be an element resource (such as Activity), not a collection (such as Activities).
  • In order to generate child endpoints, there must already be a set of CRUD endpoints for the parent resource.

Be aware that, for most endpoints, the resource name is the same as what appears in the endpoint path. For example, the resource name for GET /activities/{ActivityId} is Activity. But sometimes, the endpoint path differs from the resource name. For example, the resource name for GET /contacts/{contactId} is not Contact, but rather ClaimContact. To verify you are using the correct name, check the resourceType from the parent resource's schema.

Is the collection resource backed by a (s)tream or (q)uery?

Select whether your collection is loaded using a Java stream or a Gosu query.

Which roles can access the GET collection and GET element endpoint? 
If you do not want to specify roles, just press Enter.

The REST endpoint generator lists the available roles. Enter a comma-separated list of roles that will have GET access.

Note that you do not need to answer any of the authorization prompts. You can press Enter for each prompt. However, this only bypasses the coding done by the REST endpoint generator. This does not bypass the need to configure authorization for the endpoints.

Which roles can access the POST collection endpoint? If you do not 
want to specify roles, just press Enter.

The REST endpoint generator lists the available roles. Enter a comma-separated list of roles that will have POST access. Note that GET access is required for POST access. Thus, any role which was not given GET access cannot be given POST access.

Which roles can access the PATCH element endpoint? If you do not 
want to specify roles, just press Enter.

The REST endpoint generator lists the available roles. Enter a comma-separated list of roles that will have PATCH access. Note that GET access is required for PATCH access. Thus, any role which was not given GET access cannot be given PATCH access.

Which roles can access the DELETE element endpoint? If you do not 
want to specify roles, just press Enter.

The REST endpoint generator lists the available roles. Enter a comma-separated list of roles that will have DELETE access. Note that GET access is required for DELETE access. Thus, any role which was not given GET access cannot be given DELETE access.

Should <CustomEntity> be added to an integration graph?

Enter "y" or "n". For more information on adding custom resources to integration graphs, see Additional conisderations for generated endpoints.

Completion of the script

After the REST endpoint generator script successfully completes, it lists information about the files it created or modified.

2022-03-18 16:42:42,817 INFO Beginning endpoint generation2022-03-18 16:42:42,818 INFO Generating resource classes
2022-03-18 16:42:42,832 INFO Modifying configuration file <api_collection>_ext-1.0.swagger.yaml
2022-03-18 16:42:42,877 INFO Modifying configuration file <api_collection>_ext-1.0.mapping.json
2022-03-18 16:42:42,880 INFO Modifying configuration file <api_collection>_ext-1.0.updater.json
2022-03-18 16:42:42,885 INFO Modifying configuration file shared_ext-1.0.apiconfig.yaml
2022-03-18 16:42:42,903 INFO Modifying configuration file default_ext-1.0.access.yaml
2022-03-18 16:42:42,905 INFO Modifying configuration file gwabuid_ext-1.0.access.yaml
2022-03-18 16:42:42,907 INFO Modifying configuration file internal_ext-1.0.access.yaml
2022-03-18 16:42:42,909 INFO Modifying configuration file policyNumbers_ext-1.0.access.yaml
2022-03-18 16:42:42,917 INFO Modifying configuration file <role>.role.yaml
2022-03-18 16:42:42,939 INFO Finished endpoint generation