Skip to content

Commit

Permalink
Merge pull request #2025 from hbz/1340-AdjustDescribedByJsonSchema
Browse files Browse the repository at this point in the history
Schema: Adjust describedBy properties according to the fix transformation
  • Loading branch information
TobiasNx authored Aug 7, 2024
2 parents a859f36 + 80d47c7 commit d1599ed
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 76 deletions.
146 changes: 74 additions & 72 deletions src/test/resources/schemas/describedBy.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,76 +21,6 @@
"title": "Label of the description",
"type": "string"
},
"dateCreated": {
"title": "Creation date of the metadata record",
"type": "string",
"pattern": "^(((\\d{4})(0[13578]|10|12)(0[1-9]|[12][0-9]|3[01]))|((\\d{4})(0[469]|11)([0][1-9]|[12][0-9]|30))|((\\d{4})(02)(0[1-9]|1[0-9]|2[0-8]))|(([02468][048]00)(02)(29))|(([13579][26]00) (02)(29))|(([0-9][0-9][0][48])(02)(29))|(([0-9][0-9][2468][048])(02)(29))|(([0-9][0-9][13579][26])(02)(29))|(00000000)|(88888888)|(99999999))?$"
},
"dateModified": {
"title": "Modification date of the metadata record",
"type": "string",
"pattern": "^(((\\d{4})(0[13578]|10|12)(0[1-9]|[12][0-9]|3[01]))|((\\d{4})(0[469]|11)([0][1-9]|[12][0-9]|30))|((\\d{4})(02)(0[1-9]|1[0-9]|2[0-8]))|(([02468][048]00)(02)(29))|(([13579][26]00) (02)(29))|(([0-9][0-9][0][48])(02)(29))|(([0-9][0-9][2468][048])(02)(29))|(([0-9][0-9][13579][26])(02)(29))|(00000000)|(88888888)|(99999999))?$"
},
"provider": {
"title": "Provider of the metadata record",
"type": "object",
"properties": {
"id": {
"title": "lobid-organisations URI",
"type": "string",
"format": "uri",
"pattern": "^http:\\/\\/lobid.org\\/organisations\\/\\D{1,4}-[A-Za-z0-9-:\\/]{1,11}"
},
"label": {
"title": "label",
"type": "string"
}
},
"required": [
"id",
"label"
]
},
"sourceOrganization": {
"title": "Organization that added the record to the union catalog",
"type": "object",
"properties": {
"id": {
"title": "lobid-organisations URI",
"type": "string",
"format": "uri",
"pattern": "^http:\\/\\/lobid.org\\/organisations\\/\\D{1,4}-[A-Za-z0-9-:\\/]{1,11}"
},
"label": {
"title": "label",
"type": "string"
}
},
"required": [
"id",
"label"
]
},
"modifiedBy": {
"title": "Organization from which the record was last modified",
"type": "object",
"properties": {
"id": {
"title": "lobid-organisations URI",
"type": "string",
"format": "uri",
"pattern": "^http:\\/\\/lobid.org\\/organisations\\/\\D{1,4}-[A-Za-z0-9-:\\/]{1,11}"
},
"label": {
"title": "label",
"type": "string"
}
},
"required": [
"id",
"label"
]
},
"inDataset": {
"title": "Link to the dataset that contains the record",
"type": "object",
Expand Down Expand Up @@ -154,6 +84,18 @@
"type": "string",
"format": "uri"
},
"dateCreated": {
"title": "Creation date of the metadata record",
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}"
},
"dateModified": {
"title": "Modification date of the metadata record",
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}"
},
"label": {
"type": "string"
},
Expand All @@ -176,13 +118,74 @@
"const": "hbz_unioncatalog"
}
}
},
"sourceOrganization": {
"title": "Organization that added the record to the union catalog",
"type": "object",
"properties": {
"id": {
"title": "lobid-organisations URI",
"type": "string",
"format": "uri"
},
"label": {
"title": "label",
"type": "string"
}
},
"required": [
"id",
"label"
]
},
"provider": {
"title": "Provider of the metadata record",
"type": "object",
"properties": {
"id": {
"title": "lobid-organisations URI",
"type": "string",
"format": "uri"
},
"label": {
"title": "label",
"type": "string"
}
},
"required": [
"id",
"label"
]
},
"modifiedBy": {
"title": "Organization from which the record was last modified",
"type": "array",
"items": {
"properties": {
"id": {
"title": "lobid-organisations URI",
"type": "string",
"format": "uri"
},
"label": {
"title": "label",
"type": "string"
}
},
"type": "object",
"required": [
"id",
"label"
]
}
}
},
"required": [
"id",
"type",
"label",
"inDataset"
"inDataset",
"dateCreated"
]
},
"endTime": {
Expand Down Expand Up @@ -226,7 +229,6 @@
"id",
"type",
"label",
"dateCreated",
"inDataset",
"resultOf",
"license"
Expand Down
13 changes: 9 additions & 4 deletions src/test/resources/schemas/spatial.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$id": "spatial.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Spatial",
"description": "Object for NWBib spatial classification",
"description": "Object for NWBib and RPB spatial classification",
"type": "array",
"items": {
"type": "object",
Expand Down Expand Up @@ -30,7 +30,10 @@
"id": {
"type": "string",
"format": "uri",
"const": "https://nwbib.de/spatial"
"enum": [
"https://nwbib.de/spatial",
"https://rpb.lobid.org/spatial"
]
},
"label": {
"type": "string"
Expand Down Expand Up @@ -58,10 +61,12 @@
"type": "object",
"properties": {
"lat": {
"type": "number"
"type": "string",
"pattern": "[\\d]*\\.[\\d]*"
},
"lon": {
"type": "number"
"type": "string",
"pattern": "[\\d]*\\.[\\d]*"
}
}
}
Expand Down

0 comments on commit d1599ed

Please sign in to comment.