From be506eee09bc9037849ce1863af71ae70e576278 Mon Sep 17 00:00:00 2001 From: Sebastian Iancu Date: Mon, 4 Dec 2023 23:32:39 +0100 Subject: [PATCH] adding and updating demographic spec (#99 SPECITS-70) --- specifications/demographic.openapi.yaml | 112 ++++++------------ specifications/headers/Location_PARTY.yaml | 6 + .../Location_VERSIONED_PARTY_VERSION.yaml | 6 + specifications/operations/actor_create.yaml | 23 ---- specifications/operations/party_create.yaml | 25 ++++ specifications/operations/party_delete.yaml | 20 ++++ specifications/operations/party_get.yaml | 23 ++++ specifications/operations/party_update.yaml | 35 ++++++ .../operations/versioned_party_get.yaml | 13 ++ .../versioned_party_revision_history.yaml | 13 ++ .../versioned_party_version_get_at_time.yaml | 16 +++ .../versioned_party_version_get_by_id.yaml | 14 +++ .../path/versioned_object_uid_PARTY.yaml | 9 ++ .../responses/200_PARTY_retrieved.yaml | 11 ++ .../responses/200_PARTY_updated.yaml | 11 ++ .../responses/200_VERSIONED_PARTY.yaml | 6 + .../200_VERSION_of_PARTY_at_time.yaml | 11 ++ .../responses/200_VERSION_of_PARTY_by_id.yaml | 6 + specifications/responses/201_PARTY.yaml | 12 ++ .../responses/204_PARTY_deleted.yaml | 7 ++ specifications/responses/400_PARTY.yaml | 6 + specifications/responses/404.yaml | 2 + .../404_not_found_or_no_version_at_time.yaml | 2 + .../409_PARTY_with_uid_based_id.yaml | 8 ++ specifications/responses/412_PARTY.yaml | 8 ++ specifications/responses/422_PARTY.yaml | 2 + 26 files changed, 311 insertions(+), 96 deletions(-) create mode 100644 specifications/headers/Location_PARTY.yaml create mode 100644 specifications/headers/Location_VERSIONED_PARTY_VERSION.yaml delete mode 100644 specifications/operations/actor_create.yaml create mode 100644 specifications/operations/party_create.yaml create mode 100644 specifications/operations/party_delete.yaml create mode 100644 specifications/operations/party_get.yaml create mode 100644 specifications/operations/party_update.yaml create mode 100644 specifications/operations/versioned_party_get.yaml create mode 100644 specifications/operations/versioned_party_revision_history.yaml create mode 100644 specifications/operations/versioned_party_version_get_at_time.yaml create mode 100644 specifications/operations/versioned_party_version_get_by_id.yaml create mode 100644 specifications/parameters/path/versioned_object_uid_PARTY.yaml create mode 100644 specifications/responses/200_PARTY_retrieved.yaml create mode 100644 specifications/responses/200_PARTY_updated.yaml create mode 100644 specifications/responses/200_VERSIONED_PARTY.yaml create mode 100644 specifications/responses/200_VERSION_of_PARTY_at_time.yaml create mode 100644 specifications/responses/200_VERSION_of_PARTY_by_id.yaml create mode 100644 specifications/responses/201_PARTY.yaml create mode 100644 specifications/responses/204_PARTY_deleted.yaml create mode 100644 specifications/responses/400_PARTY.yaml create mode 100644 specifications/responses/404.yaml create mode 100644 specifications/responses/404_not_found_or_no_version_at_time.yaml create mode 100644 specifications/responses/409_PARTY_with_uid_based_id.yaml create mode 100644 specifications/responses/412_PARTY.yaml create mode 100644 specifications/responses/422_PARTY.yaml diff --git a/specifications/demographic.openapi.yaml b/specifications/demographic.openapi.yaml index 755e35c8..55f63b65 100644 --- a/specifications/demographic.openapi.yaml +++ b/specifications/demographic.openapi.yaml @@ -24,76 +24,42 @@ security: [] paths: '/demographic/actor': post: - $ref: ./operations/actor_create.yaml - # '/ehr/{ehr_id}/composition/{uid_based_id}': - # get: - # $ref: ./operations/composition_get.yaml - # put: - # $ref: ./operations/composition_update.yaml - # delete: - # $ref: ./operations/composition_delete.yaml - # '/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}': - # get: - # $ref: ./operations/versioned_composition_get.yaml - # '/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/revision_history': - # get: - # $ref: ./operations/versioned_composition_revision_history.yaml - # '/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version': - # get: - # $ref: ./operations/versioned_composition_version_get_at_time.yaml - # '/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version/{version_uid}': - # get: - # $ref: ./operations/versioned_composition_version_get_by_id.yaml - # '/ehr/{ehr_id}/directory': - # post: - # $ref: ./operations/directory_create.yaml - # put: - # $ref: ./operations/directory_update.yaml - # delete: - # $ref: ./operations/directory_delete.yaml - # get: - # $ref: ./operations/directory_get_at_time.yaml - # '/ehr/{ehr_id}/directory/{version_uid}': - # get: - # $ref: ./operations/directory_get_by_version_id.yaml - # '/ehr/{ehr_id}/contribution': - # post: - # $ref: ./operations/contribution_create.yaml - # '/ehr/{ehr_id}/contribution/{contribution_uid}': - # get: - # $ref: ./operations/contribution_get.yaml -# tags: TODO: add demographic tags -# - name: DIRECTORY -# description: | -# Management of the [directory](https://specifications.openehr.org/releases/RM/latest/ehr.html#_directory) [FOLDER](https://specifications.openehr.org/releases/RM/latest/common.html#_folder_class) resource. -# Actions upon resources of this group are also formally described in the [I_EHR_DIRECTORY](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_directory_interface) Abstract Service Model interface. -# - name: CONTRIBUTION -# description: | -# Management of [CONTRIBUTION](https://specifications.openehr.org/releases/RM/latest/common.html#_contribution_class) resource. -# Actions upon resources of this group are also formally described in the [I_EHR_CONTRIBUTION](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_contribution_interface) Abstract Service Model interface. -# - name: DIRECTORY_schema -# x-displayName: DIRECTORY -# description: -# $ref: ./tags/DIRECTORY_schema.md -# - name: CONTRIBUTION_schema -# x-displayName: CONTRIBUTION -# description: -# $ref: ./tags/CONTRIBUTION_schema.md -x-tagGroups: - - name: Resource endpoints - tags: - - DEMOGRAPHIC - - ACTOR - - DIRECTORY - - CONTRIBUTION - - name: Resource schemas - tags: - - DEMOGRAPHIC_schema - - DIRECTORY_schema - - CONTRIBUTION_schema -# components: -# schemas: -# UAbstractItemStructure: -# $ref: ./schemas/data_structures/UAbstractItemStructure.yaml - # UAbstractContentItem: - # $ref: ./schemas/ehr/UAbstractContentItem.yaml + $ref: ./operations/party_create.yaml + '/demographic/party/{uid_based_id}': + get: + $ref: ./operations/party_get.yaml + put: + $ref: ./operations/party_update.yaml + delete: + $ref: ./operations/party_delete.yaml + '/demographic/versioned_party/{versioned_object_uid}': + get: + $ref: ./operations/versioned_party_get.yaml + '/demographic/versioned_party/{versioned_object_uid}/revision_history': + get: + $ref: ./operations/versioned_party_revision_history.yaml + '/demographic/versioned_party/{versioned_object_uid}/version': + get: + $ref: ./operations/versioned_party_version_get_at_time.yaml + '/demographic/versioned_party/{versioned_object_uid}/version/{version_uid}': + get: + $ref: ./operations/versioned_party_version_get_by_id.yaml + '/demographic/contribution': + post: + $ref: ./operations/contribution_create.yaml + '/demographic/contribution/{contribution_uid}': + get: + $ref: ./operations/contribution_get.yaml +tags: + - name: PARTY + description: | + Management of the [directory](https://specifications.openehr.org/releases/RM/latest/ehr.html#_directory) [FOLDER](https://specifications.openehr.org/releases/RM/latest/common.html#_folder_class) resource. + Actions upon resources of this group are also formally described in the [I_EHR_DIRECTORY](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_directory_interface) Abstract Service Model interface. + - name: CONTRIBUTION + description: | + Management of [CONTRIBUTION](https://specifications.openehr.org/releases/RM/latest/common.html#_contribution_class) resource. + Actions upon resources of this group are also formally described in the [I_EHR_CONTRIBUTION](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_contribution_interface) Abstract Service Model interface. +components: + schemas: + UAbstractItemStructure: + $ref: ./schemas/data_structures/UAbstractItemStructure.yaml diff --git a/specifications/headers/Location_PARTY.yaml b/specifications/headers/Location_PARTY.yaml new file mode 100644 index 00000000..b97f7e00 --- /dev/null +++ b/specifications/headers/Location_PARTY.yaml @@ -0,0 +1,6 @@ +description: | + The `Location` response header indicates the URL of the PARTY resource. +schema: + type: string + format: url + example: 'https://openEHRSys.example.com/v1/demographic/party/6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2' diff --git a/specifications/headers/Location_VERSIONED_PARTY_VERSION.yaml b/specifications/headers/Location_VERSIONED_PARTY_VERSION.yaml new file mode 100644 index 00000000..76ed7eeb --- /dev/null +++ b/specifications/headers/Location_VERSIONED_PARTY_VERSION.yaml @@ -0,0 +1,6 @@ +description: | + The `Location` response header indicates the URL of the VERSION resource. +schema: + type: string + format: url + example: 'https://openEHRSys.example.com/v1/demographic/versioned_party/6cb19121-4307-4648-9da0-d62e4d51f19b/version/6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::1' diff --git a/specifications/operations/actor_create.yaml b/specifications/operations/actor_create.yaml deleted file mode 100644 index 61d3a9fe..00000000 --- a/specifications/operations/actor_create.yaml +++ /dev/null @@ -1,23 +0,0 @@ -operationId: actor_create -summary: Create ACTOR -description: | - Creates the first version of a new ACTOR. -tags: - - ACTOR -parameters: - - $ref: ../parameters/header/Prefer.yaml -requestBody: - description: | - The ACTOR. - content: - application/json: - schema: - $ref: ../schemas/demographic/Actor.yaml - required: true -# responses: -# '201': -# $ref: ../responses/201_ACTOR.yaml -# '400': -# $ref: ../responses/400_ACTOR.yaml -# '422': -# $ref: ../responses/422_ACTOR.yaml diff --git a/specifications/operations/party_create.yaml b/specifications/operations/party_create.yaml new file mode 100644 index 00000000..8b0bffc0 --- /dev/null +++ b/specifications/operations/party_create.yaml @@ -0,0 +1,25 @@ +operationId: party_create +summary: Create PARTY +description: | + Creates the first version of a new PARTY. +tags: + - PARTY +parameters: + - $ref: ../parameters/header/Prefer.yaml +requestBody: + description: | + The PARTY. + content: + application/json: + schema: + $ref: ../schemas/demographic/UParty.yaml + required: true +responses: + '201': + $ref: ../responses/201_PARTY.yaml + '400': + $ref: ../responses/400_PARTY.yaml + '422': + $ref: ../responses/422_PARTY.yaml + '404': + $ref: ../responses/404.yaml diff --git a/specifications/operations/party_delete.yaml b/specifications/operations/party_delete.yaml new file mode 100644 index 00000000..538d0edb --- /dev/null +++ b/specifications/operations/party_delete.yaml @@ -0,0 +1,20 @@ +operationId: party_delete +summary: Delete PARTY +description: | + Deletes the PARTY identified by `uid_based_id`. + + The `uid_based_id` MUST be in a form of an OBJECT_VERSION_ID identifier taken from the last (most recent) VERSION.uid.value, representing the `preceding_version_uid` to be deleted. + +tags: + - PARTY +parameters: + - $ref: ../parameters/path/uid_based_id_as_version_uid.yaml +responses: + '204': + $ref: ../responses/204_PARTY_deleted.yaml + '400': + $ref: ../responses/400_already_deleted.yaml + '404': + $ref: ../responses/404.yaml + '409': + $ref: ../responses/409_PARTY_with_uid_based_id.yaml diff --git a/specifications/operations/party_get.yaml b/specifications/operations/party_get.yaml new file mode 100644 index 00000000..27dc1367 --- /dev/null +++ b/specifications/operations/party_get.yaml @@ -0,0 +1,23 @@ +operationId: party_get +summary: Get PARTY +description: | + Retrieves a version of the PARTY identified by `uid_based_id`. + + The `uid_based_id` can take a form of an OBJECT_VERSION_ID identifier taken from VERSION.uid.value (i.e. a `version_uid`), or a form of a HIER_OBJECT_ID identifier taken from VERSIONED_OBJECT.uid.value (i.e. a `versioned_object_uid`). + The former is used to retrieve a specific known version of the PARTY (e.g. one identified by `8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1`), whereas the later (e.g. an identifier like `8849182c-82ad-4088-a07f-48ead4180515`) is be used to retrieve a version from the version container whenever the _version_tree_id_ is unknown or irrelevant (such as when most recent version is requested). + + When the `uid_based_id` has the form of a HIER_OBJECT_ID, if the `version_at_time` is supplied, retrieves the version extant _at specified time_, otherwise retrieves the _latest_ PARTY version. + + See [Resource identification](overview.html#tag/Resources/Resource-identification) for more details about the identifiers usage and meaning. +tags: + - PARTY +parameters: + - $ref: ../parameters/path/uid_based_id.yaml + - $ref: ../parameters/query/version_at_time.yaml +responses: + '200': + $ref: ../responses/200_PARTY_retrieved.yaml + '204': + $ref: ../responses/204_because_deleted_at_time.yaml + '404': + $ref: ../responses/404_not_found_or_no_version_at_time.yaml diff --git a/specifications/operations/party_update.yaml b/specifications/operations/party_update.yaml new file mode 100644 index 00000000..f7d8f961 --- /dev/null +++ b/specifications/operations/party_update.yaml @@ -0,0 +1,35 @@ +operationId: party_update +summary: Update PARTY +description: | + Updates PARTY identified by `uid_based_id`. + + The `uid_based_id` can take only a form of an HIER_OBJECT_ID identifier taken from VERSIONED_OBJECT.uid.value (i.e. a `versioned_object_uid`). + + If the request body already contains a PARTY.uid.value, it must match the `uid_based_id` in the URL. + + The existing latest `version_uid` of PARTY resource (i.e. the `preceding_version_uid`) must be specified in the `If-Match` header. +tags: + - PARTY +parameters: + - $ref: ../parameters/path/uid_based_id_as_versioned_object_uid.yaml + - $ref: ../parameters/header/If-Match.yaml + - $ref: ../parameters/header/Prefer.yaml +requestBody: + description: | + The new PARTY. + content: + application/json: + schema: + $ref: ../schemas/demographic/UParty.yaml + required: true +responses: + '200': + $ref: ../responses/200_PARTY_updated.yaml + '400': + $ref: ../responses/400_PARTY.yaml + '404': + $ref: ../responses/404.yaml + '412': + $ref: ../responses/412_PARTY.yaml + '422': + $ref: ../responses/422_PARTY.yaml diff --git a/specifications/operations/versioned_party_get.yaml b/specifications/operations/versioned_party_get.yaml new file mode 100644 index 00000000..85d54089 --- /dev/null +++ b/specifications/operations/versioned_party_get.yaml @@ -0,0 +1,13 @@ +operationId: versioned_party_get +summary: Get versioned PARTY +description: | + Retrieves a VERSIONED_PARTY identified by `versioned_object_uid`. +tags: + - PARTY +parameters: + - $ref: ../parameters/path/versioned_object_uid_PARTY.yaml +responses: + '200': + $ref: ../responses/200_VERSIONED_PARTY.yaml + '404': + $ref: ../responses/404.yaml diff --git a/specifications/operations/versioned_party_revision_history.yaml b/specifications/operations/versioned_party_revision_history.yaml new file mode 100644 index 00000000..ffaa8213 --- /dev/null +++ b/specifications/operations/versioned_party_revision_history.yaml @@ -0,0 +1,13 @@ +operationId: versioned_party_revision_history +summary: Get versioned PARTY revision history +description: | + Retrieves revision history of the VERSIONED_PARTY identified by `versioned_object_uid`. +tags: + - PARTY +parameters: + - $ref: ../parameters/path/versioned_object_uid_PARTY.yaml +responses: + '200': + $ref: ../responses/200_REVISION_HISTORY.yaml + '404': + $ref: ../responses/404.yaml diff --git a/specifications/operations/versioned_party_version_get_at_time.yaml b/specifications/operations/versioned_party_version_get_at_time.yaml new file mode 100644 index 00000000..a87bea91 --- /dev/null +++ b/specifications/operations/versioned_party_version_get_at_time.yaml @@ -0,0 +1,16 @@ +operationId: versioned_party_version_get_at_time +summary: Get versioned PARTY version at time +description: | + Retrieves a VERSION from the VERSIONED_PARTY identified by `versioned_object_uid`. + + If `version_at_time` is supplied, retrieves the VERSION extant _at specified time_, otherwise retrieves the _latest_ VERSION. +tags: + - PARTY +parameters: + - $ref: ../parameters/path/versioned_object_uid_PARTY.yaml + - $ref: ../parameters/query/version_at_time.yaml +responses: + '200': + $ref: ../responses/200_VERSION_of_PARTY_at_time.yaml + '404': + $ref: ../responses/404_not_found_or_no_version_at_time.yaml diff --git a/specifications/operations/versioned_party_version_get_by_id.yaml b/specifications/operations/versioned_party_version_get_by_id.yaml new file mode 100644 index 00000000..fe19bd3d --- /dev/null +++ b/specifications/operations/versioned_party_version_get_by_id.yaml @@ -0,0 +1,14 @@ +operationId: versioned_composition_version_get_by_id +summary: Get versioned PARTY version by id +description: | + Retrieves a VERSION identified by `version_uid` of a VERSIONED_PARTY identified by `versioned_object_uid`. +tags: + - PARTY +parameters: + - $ref: ../parameters/path/versioned_object_uid_PARTY.yaml + - $ref: ../parameters/path/version_uid.yaml +responses: + '200': + $ref: ../responses/200_VERSION_of_PARTY_by_id.yaml + '404': + $ref: ../responses/404.yaml diff --git a/specifications/parameters/path/versioned_object_uid_PARTY.yaml b/specifications/parameters/path/versioned_object_uid_PARTY.yaml new file mode 100644 index 00000000..2625a596 --- /dev/null +++ b/specifications/parameters/path/versioned_object_uid_PARTY.yaml @@ -0,0 +1,9 @@ +name: versioned_object_uid +in: path +description: | + VERSIONED_PARTY identifier taken from VERSIONED_PARTY.uid.value. +required: true +style: simple +schema: + type: string + example: '6cb19121-4307-4648-9da0-d62e4d51f19b' diff --git a/specifications/responses/200_PARTY_retrieved.yaml b/specifications/responses/200_PARTY_retrieved.yaml new file mode 100644 index 00000000..78afd9b5 --- /dev/null +++ b/specifications/responses/200_PARTY_retrieved.yaml @@ -0,0 +1,11 @@ +description: | + `200 OK` is returned when the requested PARTY is successfully retrieved. +headers: + ETag: + $ref: ../headers/ETag.yaml + Location: + $ref: ../headers/Location_PARTY.yaml +content: + application/json: + schema: + $ref: ../schemas/demographic/UParty.yaml diff --git a/specifications/responses/200_PARTY_updated.yaml b/specifications/responses/200_PARTY_updated.yaml new file mode 100644 index 00000000..0482a49e --- /dev/null +++ b/specifications/responses/200_PARTY_updated.yaml @@ -0,0 +1,11 @@ +description: | + `200 OK` is returned when the UPDATE is successfully updated and the updated resource is returned in the body when `Prefer` header value is `return=representation`. +headers: + ETag: + $ref: ../headers/ETag.yaml + Location: + $ref: ../headers/Location_PARTY.yaml +content: + application/json: + schema: + $ref: ../schemas/demographic/UParty.yaml diff --git a/specifications/responses/200_VERSIONED_PARTY.yaml b/specifications/responses/200_VERSIONED_PARTY.yaml new file mode 100644 index 00000000..4beacfe3 --- /dev/null +++ b/specifications/responses/200_VERSIONED_PARTY.yaml @@ -0,0 +1,6 @@ +description: | + `200 OK` is returned when the requested VERSIONED_PARTY is successfully retrieved. +content: + application/json: + schema: + $ref: ../schemas/demographic/VersionedParty.yaml diff --git a/specifications/responses/200_VERSION_of_PARTY_at_time.yaml b/specifications/responses/200_VERSION_of_PARTY_at_time.yaml new file mode 100644 index 00000000..0c3da9bb --- /dev/null +++ b/specifications/responses/200_VERSION_of_PARTY_at_time.yaml @@ -0,0 +1,11 @@ +description: | + `200 OK` is returned when the requested VERSION is successfully retrieved. +headers: + ETag: + $ref: ../headers/ETag_VERSION.yaml + Location: + $ref: ../headers/Location_VERSIONED_PARTY_VERSION.yaml +content: + application/json: + schema: + $ref: ../schemas/demographic/UVersionOfParty.yaml diff --git a/specifications/responses/200_VERSION_of_PARTY_by_id.yaml b/specifications/responses/200_VERSION_of_PARTY_by_id.yaml new file mode 100644 index 00000000..38d68bfc --- /dev/null +++ b/specifications/responses/200_VERSION_of_PARTY_by_id.yaml @@ -0,0 +1,6 @@ +description: | + `200 OK` is returned when the requested VERSION is successfully retrieved. +content: + application/json: + schema: + $ref: ../schemas/demographic/UVersionOfParty.yaml diff --git a/specifications/responses/201_PARTY.yaml b/specifications/responses/201_PARTY.yaml new file mode 100644 index 00000000..2c921623 --- /dev/null +++ b/specifications/responses/201_PARTY.yaml @@ -0,0 +1,12 @@ +description: | + `201 Created` is returned when the PARTY was created. + Content body is only returned when `Prefer` header has `return=representation`, otherwise only headers are returned. +headers: + ETag: + $ref: ../headers/ETag.yaml + Location: + $ref: ../headers/Location_PARTY.yaml +content: + application/json: + schema: + $ref: ../schemas/demographic/UParty.yaml diff --git a/specifications/responses/204_PARTY_deleted.yaml b/specifications/responses/204_PARTY_deleted.yaml new file mode 100644 index 00000000..d2238b4c --- /dev/null +++ b/specifications/responses/204_PARTY_deleted.yaml @@ -0,0 +1,7 @@ +description: | + `204 No Content` is returned when PARTY was deleted. +headers: + ETag: + $ref: ../headers/ETag.yaml + Location: + $ref: ../headers/Location_PARTY.yaml diff --git a/specifications/responses/400_PARTY.yaml b/specifications/responses/400_PARTY.yaml new file mode 100644 index 00000000..422e7c95 --- /dev/null +++ b/specifications/responses/400_PARTY.yaml @@ -0,0 +1,6 @@ +description: | + `400 Bad Request` is returned when the request URL or body (if provided) could not be parsed or has invalid content (e.g. the body of the request could not be read, or could not be converted to a valid PARTY object). +content: + application/json: + schema: + $ref: ../schemas/others/Error.yaml diff --git a/specifications/responses/404.yaml b/specifications/responses/404.yaml new file mode 100644 index 00000000..67847746 --- /dev/null +++ b/specifications/responses/404.yaml @@ -0,0 +1,2 @@ +description: | + `404 Not Found` is returned when either the URL configured doesn't exist at all, or the targeted resource doesn't exist. diff --git a/specifications/responses/404_not_found_or_no_version_at_time.yaml b/specifications/responses/404_not_found_or_no_version_at_time.yaml new file mode 100644 index 00000000..c32e07c4 --- /dev/null +++ b/specifications/responses/404_not_found_or_no_version_at_time.yaml @@ -0,0 +1,2 @@ +description: | + `404 Not Found` is returned when either the URL configured doesn't exist at all, or the targeted resource doesn't exist, or when a version of the resource does not exist at the specified `version_at_time`. diff --git a/specifications/responses/409_PARTY_with_uid_based_id.yaml b/specifications/responses/409_PARTY_with_uid_based_id.yaml new file mode 100644 index 00000000..24a2020e --- /dev/null +++ b/specifications/responses/409_PARTY_with_uid_based_id.yaml @@ -0,0 +1,8 @@ +description: | + `409 Conflict` is returned when supplied `uid_based_id` doesn't match the latest version. + Returns also latest version in the `Location` and `ETag` headers. +headers: + ETag: + $ref: ../headers/ETag.yaml + Location: + $ref: ../headers/Location_PARTY.yaml diff --git a/specifications/responses/412_PARTY.yaml b/specifications/responses/412_PARTY.yaml new file mode 100644 index 00000000..d806a488 --- /dev/null +++ b/specifications/responses/412_PARTY.yaml @@ -0,0 +1,8 @@ +description: | + `412 Precondition Failed` is returned when `If-Match` request header doesn't match the latest version on the service side. + Returns also latest `version_uid` in the `Location` and `ETag` headers. +headers: + ETag: + $ref: ../headers/ETag.yaml + Location: + $ref: ../headers/Location_PARTY.yaml diff --git a/specifications/responses/422_PARTY.yaml b/specifications/responses/422_PARTY.yaml new file mode 100644 index 00000000..1170b2c4 --- /dev/null +++ b/specifications/responses/422_PARTY.yaml @@ -0,0 +1,2 @@ +description: | + `422 Unprocessable Entity` is returned when the content could be converted to a PARTY, but there are semantic validation errors, such as the underlying template is not known or is not validating the supplied PARTY.