From 569a5e82eafba606cdb36b86359294886a1ff6b4 Mon Sep 17 00:00:00 2001 From: Guillaume Grossetie Date: Thu, 14 Nov 2024 17:35:22 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20nouvelle=20structure=20des=20m=C3=A9tad?= =?UTF-8?q?onn=C3=A9es=20d'un=20article?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/schemas/article-metadata.schema.json | 232 ++++++++++++++++++ .../corpus-journal-metadata.schema.json | 4 + 2 files changed, 236 insertions(+) create mode 100644 front/src/schemas/article-metadata.schema.json diff --git a/front/src/schemas/article-metadata.schema.json b/front/src/schemas/article-metadata.schema.json new file mode 100644 index 000000000..9d9526768 --- /dev/null +++ b/front/src/schemas/article-metadata.schema.json @@ -0,0 +1,232 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://stylo.huma-num.fr/schemas/article-metadata.schema.json", + "title": "Article metadata", + "type": "object", + "definitions": { + "lang": { + "type": "string", + "enum": [ + "fr", + "en", + "it", + "es", + "pt", + "de", + "uk", + "ar" + ] + }, + "person": { + "type": "object", + "properties": { + "surname": { + "type": "string", + "title": "Last name" + }, + "forname": { + "type": "string", + "title": "First name" + }, + "affiliations": { + "type": "string", + "title": "Affiliations" + }, + "biography": { + "type": "string", + "title": "Biography" + }, + "email": { + "type": "string", + "title": "Email" + }, + "orcid": { + "type": "string", + "title": "ORCID" + }, + "viaf": { + "type": "string", + "title": "VIAF" + }, + "foaf": { + "type": "string", + "title": "FOAF" + }, + "isni": { + "type": "string", + "title": "ISNI" + }, + "wikidata": { + "type": "string", + "title": "Wikidata" + } + } + }, + "localizedContent": { + "type": "object", + "properties": { + "lang": { + "$ref": "#/definitions/lang" + }, + "title": { + "type": "string" + }, + "subtitle": { + "type": "string" + }, + "abstract": { + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "properties": { + "type": { + "type": "string", + "const": "article" + }, + "@version": { + "type": "string", + "const": "1.0" + }, + "id": { + "type": "string" + }, + "publicationDate": { + "type": "string", + "format": "date" + }, + "url": { + "type": "string", + "format": "uri" + }, + "license": { + "type": "string" + }, + "localizedContent": { + "type": "array", + "items": { + "$ref": "#/definitions/localizedContent" + } + }, + "authors": { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + }, + "reviewers": { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + }, + "transcribers": { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + }, + "translators": { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + }, + "translations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "url": { + "type": "string" + }, + "lang": { + "$ref": "#/definitions/lang" + } + } + } + }, + "issue": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "number": { + "type": "string" + } + } + }, + "issueDirectors": { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + }, + "issn": { + "type": "string" + }, + "producer": { + "type": "string" + }, + "prodNum": { + "type": "string" + }, + "diffNum": { + "type": "string" + }, + "funder": { + "type": "object", + "title": "", + "properties": { + "organization": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "journal": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "publisher": { + "type": "string" + }, + "email": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "journalDirectors": { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/localizedContent" + } + ] +} diff --git a/front/src/schemas/corpus-journal-metadata.schema.json b/front/src/schemas/corpus-journal-metadata.schema.json index c5a545ad2..859537903 100644 --- a/front/src/schemas/corpus-journal-metadata.schema.json +++ b/front/src/schemas/corpus-journal-metadata.schema.json @@ -8,6 +8,10 @@ "type": "string", "const": "journal" }, + "@version": { + "type": "string", + "const": "1.0" + }, "name": { "type": "string" },