Skip to content

Commit

Permalink
adding OpenApi demographic types (#99 SPECITS-70)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-iancu committed Dec 4, 2023
1 parent 3af77cc commit a2b0947
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 0 deletions.
11 changes: 11 additions & 0 deletions specifications/schemas/demographic/UMAgent.yaml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions specifications/schemas/demographic/UMGroup.yaml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions specifications/schemas/demographic/UMImportedVersionOfParty.yaml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions specifications/schemas/demographic/UMOrganisation.yaml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions specifications/schemas/demographic/UMOriginalVersionOfParty.yaml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions specifications/schemas/demographic/UMPerson.yaml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions specifications/schemas/demographic/UMRole.yaml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions specifications/schemas/demographic/UParty.yaml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions specifications/schemas/demographic/UVersionOfParty.yaml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions specifications/schemas/demographic/VersionOfParty.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a2b0947

Please sign in to comment.