From a2b0947f707cf3a2b017c425d31e2ec3abf64a55 Mon Sep 17 00:00:00 2001 From: Sebastian Iancu Date: Mon, 4 Dec 2023 22:26:52 +0100 Subject: [PATCH] adding OpenApi demographic types (#99 SPECITS-70) --- .../schemas/demographic/UMAgent.yaml | 11 +++++++++++ .../schemas/demographic/UMGroup.yaml | 11 +++++++++++ .../demographic/UMImportedVersionOfParty.yaml | 15 +++++++++++++++ .../schemas/demographic/UMOrganisation.yaml | 11 +++++++++++ .../demographic/UMOriginalVersionOfParty.yaml | 13 +++++++++++++ .../schemas/demographic/UMPerson.yaml | 11 +++++++++++ specifications/schemas/demographic/UMRole.yaml | 11 +++++++++++ specifications/schemas/demographic/UParty.yaml | 15 +++++++++++++++ .../schemas/demographic/UVersionOfParty.yaml | 9 +++++++++ .../schemas/demographic/VersionOfParty.yaml | 18 ++++++++++++++++++ 10 files changed, 125 insertions(+) create mode 100644 specifications/schemas/demographic/UMAgent.yaml create mode 100644 specifications/schemas/demographic/UMGroup.yaml create mode 100644 specifications/schemas/demographic/UMImportedVersionOfParty.yaml create mode 100644 specifications/schemas/demographic/UMOrganisation.yaml create mode 100644 specifications/schemas/demographic/UMOriginalVersionOfParty.yaml create mode 100644 specifications/schemas/demographic/UMPerson.yaml create mode 100644 specifications/schemas/demographic/UMRole.yaml create mode 100644 specifications/schemas/demographic/UParty.yaml create mode 100644 specifications/schemas/demographic/UVersionOfParty.yaml create mode 100644 specifications/schemas/demographic/VersionOfParty.yaml diff --git a/specifications/schemas/demographic/UMAgent.yaml b/specifications/schemas/demographic/UMAgent.yaml new file mode 100644 index 00000000..a638bb31 --- /dev/null +++ b/specifications/schemas/demographic/UMAgent.yaml @@ -0,0 +1,11 @@ +title: AGENT +type: object +allOf: + - $ref: ../demographic/Agent.yaml +required: + - _type +properties: + _type: + type: string + enum: [AGENT] +x-discriminator-value: AGENT diff --git a/specifications/schemas/demographic/UMGroup.yaml b/specifications/schemas/demographic/UMGroup.yaml new file mode 100644 index 00000000..a07ac281 --- /dev/null +++ b/specifications/schemas/demographic/UMGroup.yaml @@ -0,0 +1,11 @@ +title: GROUP +type: object +allOf: + - $ref: ../demographic/Group.yaml +required: + - _type +properties: + _type: + type: string + enum: [GROUP] +x-discriminator-value: GROUP diff --git a/specifications/schemas/demographic/UMImportedVersionOfParty.yaml b/specifications/schemas/demographic/UMImportedVersionOfParty.yaml new file mode 100644 index 00000000..85cf670d --- /dev/null +++ b/specifications/schemas/demographic/UMImportedVersionOfParty.yaml @@ -0,0 +1,15 @@ +title: IMPORTED_VERSION +type: object +allOf: + - $ref: ../common/ImportedVersion.yaml +required: + - _type +properties: + _type: + type: string + enum: [IMPORTED_VERSION] + data: + $ref: ../demographic/UParty.yaml + item: + $ref: ../demographic/UMOriginalVersionOfParty.yaml +x-discriminator-value: IMPORTED_VERSION diff --git a/specifications/schemas/demographic/UMOrganisation.yaml b/specifications/schemas/demographic/UMOrganisation.yaml new file mode 100644 index 00000000..55e7a9e8 --- /dev/null +++ b/specifications/schemas/demographic/UMOrganisation.yaml @@ -0,0 +1,11 @@ +title: ORGANISATION +type: object +allOf: + - $ref: ../demographic/Organisation.yaml +required: + - _type +properties: + _type: + type: string + enum: [ORGANISATION] +x-discriminator-value: ORGANISATION diff --git a/specifications/schemas/demographic/UMOriginalVersionOfParty.yaml b/specifications/schemas/demographic/UMOriginalVersionOfParty.yaml new file mode 100644 index 00000000..a5de138b --- /dev/null +++ b/specifications/schemas/demographic/UMOriginalVersionOfParty.yaml @@ -0,0 +1,13 @@ +title: ORIGINAL_VERSION +type: object +allOf: + - $ref: ../common/OriginalVersion.yaml +required: + - _type +properties: + _type: + type: string + enum: [ORIGINAL_VERSION] + data: + $ref: ../demographic/UParty.yaml +x-discriminator-value: ORIGINAL_VERSION diff --git a/specifications/schemas/demographic/UMPerson.yaml b/specifications/schemas/demographic/UMPerson.yaml new file mode 100644 index 00000000..d4fe73a2 --- /dev/null +++ b/specifications/schemas/demographic/UMPerson.yaml @@ -0,0 +1,11 @@ +title: PERSON +type: object +allOf: + - $ref: ../demographic/Person.yaml +required: + - _type +properties: + _type: + type: string + enum: [PERSON] +x-discriminator-value: PERSON diff --git a/specifications/schemas/demographic/UMRole.yaml b/specifications/schemas/demographic/UMRole.yaml new file mode 100644 index 00000000..832c8cf6 --- /dev/null +++ b/specifications/schemas/demographic/UMRole.yaml @@ -0,0 +1,11 @@ +title: ROLE +type: object +allOf: + - $ref: ../demographic/Role.yaml +required: + - _type +properties: + _type: + type: string + enum: [ROLE] +x-discriminator-value: ROLE diff --git a/specifications/schemas/demographic/UParty.yaml b/specifications/schemas/demographic/UParty.yaml new file mode 100644 index 00000000..71916635 --- /dev/null +++ b/specifications/schemas/demographic/UParty.yaml @@ -0,0 +1,15 @@ +title: PARTY +oneOf: + - $ref: ../demographic/UMRole.yaml + - $ref: ../demographic/UMPerson.yaml + - $ref: ../demographic/UMAgent.yaml + - $ref: ../demographic/UMGroup.yaml + - $ref: ../demographic/UMOrganisation.yaml +discriminator: + propertyName: _type + mapping: + ROLE: ../demographic/UMRole.yaml + PERSON: ../demographic/UMPerson.yaml + AGENT: ../demographic/UMAgent.yaml + GROUP: ../demographic/UMGroup.yaml + ORGANISATION: ../demographic/UMOrganisation.yaml diff --git a/specifications/schemas/demographic/UVersionOfParty.yaml b/specifications/schemas/demographic/UVersionOfParty.yaml new file mode 100644 index 00000000..f0257842 --- /dev/null +++ b/specifications/schemas/demographic/UVersionOfParty.yaml @@ -0,0 +1,9 @@ +title: VERSION +oneOf: + - $ref: ../demographic/UMOriginalVersionOfParty.yaml + - $ref: ../demographic/UMImportedVersionOfParty.yaml +discriminator: + propertyName: _type + mapping: + ORIGINAL_VERSION: ../demographic/UMOriginalVersionOfParty.yaml + IMPORTED_VERSION: ../demographic/UMImportedVersionOfParty.yaml diff --git a/specifications/schemas/demographic/VersionOfParty.yaml b/specifications/schemas/demographic/VersionOfParty.yaml new file mode 100644 index 00000000..75db25a2 --- /dev/null +++ b/specifications/schemas/demographic/VersionOfParty.yaml @@ -0,0 +1,18 @@ +title: VERSION +type: object +description: A VERSION resource +required: + - contribution + - commit_audit + - data +properties: + _type: + type: string + contribution: + $ref: ../base_types/ObjectRef.yaml + signature: + type: string + commit_audit: + $ref: ../common/AuditDetails.yaml + data: + $ref: ../demographic/UParty.yaml