From e807cbd16beb945b8e0fc411c1ee766e4e81974c Mon Sep 17 00:00:00 2001 From: Nikita Lukianets Date: Mon, 26 Jul 2021 17:27:30 +0300 Subject: [PATCH] Update schema --- API/models/Annotation.yaml | 36 +++++++++++++++++ API/models/Dataset.yaml | 32 +++++++++++++++ API/models/Labeler.yaml | 48 +++++++++++++++++++++++ API/models/Labeling-Tool.yaml | 19 +++++++++ API/models/Open-Ethics-Data-Passport.yaml | 33 ++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 API/models/Annotation.yaml create mode 100644 API/models/Dataset.yaml create mode 100644 API/models/Labeler.yaml create mode 100644 API/models/Labeling-Tool.yaml create mode 100644 API/models/Open-Ethics-Data-Passport.yaml diff --git a/API/models/Annotation.yaml b/API/models/Annotation.yaml new file mode 100644 index 0000000..8612521 --- /dev/null +++ b/API/models/Annotation.yaml @@ -0,0 +1,36 @@ +title: Annotation +type: object +properties: + id: + type: string + format: uuid + datapoints: + type: number + labeler: + $ref: ./Labeler.yaml + type: + oneOf: + - properties: + name: + type: string + enum: + - internal + - outsourced + - crowdsourced + - synthetic + - dataProgramming + description: + type: string + required: + - name + type: object + tools: + type: array + items: + $ref: ./Labeling-Tool.yaml +required: + - id + - datapoints + - labeler + - type +description: Annotation model for each single Labeler diff --git a/API/models/Dataset.yaml b/API/models/Dataset.yaml new file mode 100644 index 0000000..8fb2b41 --- /dev/null +++ b/API/models/Dataset.yaml @@ -0,0 +1,32 @@ +title: Dataset +type: object +properties: + id: + type: string + format: uuid + created: + type: string + format: date-time + description: + type: string + version: + type: string + scope: + type: string + source: + type: object + properties: + description: + type: string + url: + $ref: '' + required: + - description + labeling: + type: array + items: + $ref: ./Annotation.yaml +required: + - id + - created +description: Dataset Model diff --git a/API/models/Labeler.yaml b/API/models/Labeler.yaml new file mode 100644 index 0000000..3806b30 --- /dev/null +++ b/API/models/Labeler.yaml @@ -0,0 +1,48 @@ +title: Labeler +type: object +properties: + id: + type: string + format: uuid + created: + type: string + format: date-time + updated: + type: string + format: date-time + name: + type: string + projects: + type: array + items: {} + training: + type: array + items: {} + tools: + type: array + items: + $ref: ./Labeling-Tool.yaml + contacts: + type: array + items: + type: object + properties: + type: + anyOf: + - properties: {} + enum: + - email + - phone + type: string + value: + type: string + access: + type: string + enum: + - public + - private +required: + - id + - created + - updated +description: Labeler's profile diff --git a/API/models/Labeling-Tool.yaml b/API/models/Labeling-Tool.yaml new file mode 100644 index 0000000..0528c6d --- /dev/null +++ b/API/models/Labeling-Tool.yaml @@ -0,0 +1,19 @@ +title: Labeling Tool +type: object +properties: + id: + type: string + format: uuid + name: + type: string + description: + type: string + url: + $ref: '' + version: + type: string +required: + - id + - name + - description +description: Description of the Labeling Tool diff --git a/API/models/Open-Ethics-Data-Passport.yaml b/API/models/Open-Ethics-Data-Passport.yaml new file mode 100644 index 0000000..93c8590 --- /dev/null +++ b/API/models/Open-Ethics-Data-Passport.yaml @@ -0,0 +1,33 @@ +title: Open Ethics Data Passport +type: object +description: OEDP Model +properties: + id: + type: string + format: uuid + datasets: + type: array + items: + $ref: ./Dataset.yaml + scope: + type: string + created: + type: string + format: date-time + product: + type: + - array + - string + format: uuid + items: {} + updated: + type: string + format: date-time + validUntil: + type: string + format: date-time +required: + - id + - datasets + - scope + - created