Issues on definitions endpoints

Description

Checking REST 1.0.0 / definitions found some issues on the template endpoints:

1. In GET /definition/template/adl1.4/{template_id} the template_id param should be removed from the URL because it collides with the other endpoint GET /definition/template/adl1.4/{template_id}/{version_pattern} when the version_pattern is empty (because it is optional).

Also the second endpoint is about one template and the first about a list of templates, so the template_id param doesn't make much sense on the first endpoint.

2. Remove "all" from the name "List all templates", I think "List templates" is more clear, and if in the future we add parameters for pagination, that I think should be added, the response won't be "all" templates, just a subset, but still will "list templates".

3. On the description of the 200 for the GET /definition/template/adl1.4/{template_id} endpoint it says "200 OK is returned when the EHR resource is successfully retrieved." Should replace "EHR" with "template", or rewrite that a little since it will return 200 OK even if no template is present on the server, since the empty collection of resources is still a valid response. Unless there is a 50x error, this endpoint will always return 200.

REF: https://specifications.openehr.org/releases/ITS-REST/Release-1.0.0/definitions.html#definitions

Environment

None

Status

Reporter

Pablo Pazos

Labels

Components

Priority

Major