diff --git a/front/src/schemas/article-metadata.schema.json b/front/src/schemas/article-metadata.schema.json new file mode 100644 index 00000000..f49d45a1 --- /dev/null +++ b/front/src/schemas/article-metadata.schema.json @@ -0,0 +1,236 @@ +{ + "$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" + } + }, + "production": { + "type": "object", + "properties": { + "issn": { + "type": "string" + }, + "producer": { + "type": "string" + }, + "prodNum": { + "type": "string" + }, + "diffNum": { + "type": "string" + } + } + }, + "funder": { + "type": "object", + "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 c5a545ad..85953790 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" },