Skip to content

Commit

Permalink
chore: update lists.json (DEV-851) (#190)
Browse files Browse the repository at this point in the history
* -delete old lists.json and old lists-only.json
- and add new lists.json

* -delete lists-only.json
-update lists.json

* update lists.json

* replace "lists-only.json" by "lists.json"

* change name "lists.json" to "lists-only.json"

* make mandatory: lists must contain "nodes" and at least one node
  • Loading branch information
gNahcab committed May 3, 2022
1 parent f887edd commit e0254be
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 138 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in
@@ -1,6 +1,5 @@
include README.md
include knora/dsplib/schemas/ontology.json
include knora/dsplib/schemas/lists.json
include knora/dsplib/schemas/lists-only.json
include knora/dsplib/schemas/resources-only.json
include knora/dsplib/schemas/properties-only.json
Expand Down
2 changes: 1 addition & 1 deletion knora/dsp_tools.py
Expand Up @@ -58,7 +58,7 @@ def program(user_args: list[str]) -> None:
parser_create.add_argument('-V', '--validate', action='store_true',
help='Do only validation of JSON, no upload of the '
'ontology')
parser_create.add_argument('-L', '--listfile', type=str, default='lists.json',
parser_create.add_argument('-L', '--listfile', type=str, default='lists-only.json',
help='Name of list node informationfile')
parser_create.add_argument('-l', '--lists', action='store_true', help='Upload only the list(s)')
parser_create.add_argument('-v', '--verbose', action='store_true', help=verbose_text)
Expand Down
11 changes: 8 additions & 3 deletions knora/dsplib/schemas/lists-only.json
@@ -1,10 +1,10 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"$id": "https://dasch.swiss/schema/list-only.json",
"$id": "https://dasch.swiss/schema/lists.json",
"title": "JSON schema for DSP lists",
"description": "JSON schema for the lists section used in DSP ontologies",
"definitions": {
"label": {
"langstring": {
"type": "object",
"patternProperties": {
"^(en|de|fr|it)": {
Expand All @@ -13,6 +13,9 @@
},
"additionalProperties": false
},
"label": {
"$ref": "#/definitions/langstring"
},
"comment": {
"type": "object",
"patternProperties": {
Expand All @@ -35,6 +38,7 @@
"$ref": "#/definitions/comment"
},
"nodes": {
"minItems": 1,
"oneOf": [
{
"type": "array",
Expand Down Expand Up @@ -124,7 +128,8 @@
},
"required": [
"name",
"nodes"
"nodes",
"labels"
],
"additionalProperties": false
}
132 changes: 0 additions & 132 deletions knora/dsplib/schemas/lists.json

This file was deleted.

4 changes: 3 additions & 1 deletion knora/dsplib/schemas/ontology.json
Expand Up @@ -183,6 +183,7 @@
"$ref": "#/definitions/comment"
},
"nodes": {
"minItems": 1,
"oneOf": [
{
"type": "array",
Expand Down Expand Up @@ -1207,7 +1208,8 @@
"$ref": "#/definitions/comment"
},
"required": [
"comments"
"comments",
"nodes"
]
}
},
Expand Down

0 comments on commit e0254be

Please sign in to comment.