Skip to content

Commit

Permalink
feat: nouvelle structure des métadonnées d'un article
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Nov 14, 2024
1 parent 88046e0 commit 569a5e8
Show file tree
Hide file tree
Showing 2 changed files with 236 additions and 0 deletions.
232 changes: 232 additions & 0 deletions front/src/schemas/article-metadata.schema.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
4 changes: 4 additions & 0 deletions front/src/schemas/corpus-journal-metadata.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"type": "string",
"const": "journal"
},
"@version": {
"type": "string",
"const": "1.0"
},
"name": {
"type": "string"
},
Expand Down

0 comments on commit 569a5e8

Please sign in to comment.