Skip to content

Commit

Permalink
Merge 557497b into 98b20bd
Browse files Browse the repository at this point in the history
  • Loading branch information
ppanero committed Oct 19, 2020
2 parents 98b20bd + 557497b commit c6b17cf
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 128 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ recursive-include invenio_rdm_records *.json *.csv
recursive-include invenio_rdm_records *.po *.pot
recursive-include invenio_rdm_records *.png *.svg
recursive-include invenio_rdm_records *.html *.js *.less
recursive-include tests *.py *.csv
recursive-include tests *.py *.csv *.json
125 changes: 47 additions & 78 deletions invenio_rdm_records/records/jsonschemas/records/record-v1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,32 @@
"maximum": 90
},

"scheme": {
"description": "A scheme.",
"type": "string"
},

"identifier": {
"description": "An identifier.",
"type": "string"
},

"identifiers": {
"description": "Identifiers object (keys being scheme, value being the identifier).",
"type": "object",
"additionalProperties": {"$ref": "#/definitions/identifier"}
},

"internal-pid": {
"type": "object",
"description": "An internal persistent identifier object.",
"additionalProperties": false,
"required": ["pk", "pid_type", "obj_type", "status"],
"required": ["pk", "status"],
"properties": {
"pk": {
"description": "Primary key of the PID object.",
"type": "integer"
},
"pid_type": {
"description": "The persistent identifier type (e.g. doi or recid).",
"type": "string"
},
"obj_type": {
"description": "The type of the assigned object (e.g. rec).",
"type": "string"
},
"status": {
"description": "The status of the PID (from Invenio-PIDStore).",
"type": "string",
Expand All @@ -113,12 +121,9 @@
"type": "object",
"description": "An external persistent identifier object.",
"additionalProperties": false,
"required": ["id", "provider"],
"required": ["identifier", "provider"],
"properties": {
"identifier": {
"description": "The value of the persistent identifier.",
"type": "string"
},
"identifier": {"$ref": "#/definitions/identifier"},
"provider": {
"description": "The provider of the persistent identifier.",
"type": "string"
Expand All @@ -130,16 +135,6 @@
}
},

"identifiers": {
"description": "Identifiers object (keys being scheme, value being the identifier).",
"type": "object",
"additionalProperties": {"$ref": "#/definitions/identifier"}
},

"identifier": {
"description": "An identifier.",
"type": "string",
},

"resource_type": {
"type": "object",
Expand Down Expand Up @@ -211,10 +206,7 @@
"description": "TODO - Bucket id - what about third party storage systems?",
"type": "string"
},
"file_id": {
"description": "TODO - Identifier of the file. - same as for bucket",
"type": "string"
}
"identifier": {"$ref": "#/definitions/identifier"}
}
},

Expand Down Expand Up @@ -302,7 +294,7 @@
"description": "Additional title of the record.",
"type": "string"
},
"type": {"$ref": "#/definitions/titleType"},
"type": {"$ref": "#/definitions/titleType"}
},
"required": ["title"]
}
Expand All @@ -324,8 +316,8 @@
"additionalProperties": false,
"properties": {
"subject": {"type": "string"},
"identifier": {"type": "string"},
"scheme": {"type": "string"}
"identifier": {"$ref": "#/definitions/identifier"},
"scheme": {"$ref": "#/definitions/scheme"}
},
"required": ["subject"]
}
Expand Down Expand Up @@ -373,7 +365,11 @@
"languages": {
"description": "The primary languages of the resource. ISO 639-3 language code.",
"type": "array",
"items": {"$ref": "#/definitions/lang"}
"items": {
"type": "string",
"minLength": 2,
"maxLength": 3
}
},

"identifiers": {
Expand All @@ -383,8 +379,8 @@
"type": "object",
"additionalProperties": false,
"properties": {
"identifier": {"type": "string"},
"scheme": {"type": "string"}
"identifier": {"$ref": "#/definitions/identifier"},
"scheme": {"$ref": "#/definitions/scheme"}
}
},
"uniqueItems": true
Expand All @@ -397,8 +393,8 @@
"type": "object",
"additionalProperties": false,
"properties": {
"identifier": {"type": "string"},
"scheme": {"type": "string"},
"identifier": {"$ref": "#/definitions/identifier"},
"scheme": {"$ref": "#/definitions/scheme"},
"relation": {"$ref": "#/definitions/relationType"},
"resource_type": {"$ref": "#/definitions/resource_type"}
}
Expand Down Expand Up @@ -435,14 +431,8 @@
"description": "The license name or license itself. Free text.",
"type": "string"
},
"identifier": {
"description": "An identifier for the license.",
"type": "string"
},
"scheme": {
"description": "An scheme for the identifier (e.g. spdx)",
"type": "string"
},
"identifier": {"$ref": "#/definitions/identifier"},
"scheme": {"$ref": "#/definitions/scheme"},
"url": {
"type": "string",
"format": "uri"
Expand All @@ -466,7 +456,7 @@
"description": "Description for record.",
"type": "string"
},
"type": {"$ref": "#/definitions/descriptionType"},
"type": {"$ref": "#/definitions/descriptionType"}
}
}
},
Expand Down Expand Up @@ -509,8 +499,8 @@
"additionalProperties": false,
"properties": {
"name": {"type": "string"},
"identifier": {"type": "string"},
"scheme": {"type": "string"}
"identifier": {"$ref": "#/definitions/identifier"},
"scheme": {"$ref": "#/definitions/scheme"}
}
},
"award": {
Expand All @@ -519,8 +509,8 @@
"properties": {
"title": {"type": "string"},
"number": {"type": "string"},
"identifier": {"type": "string"},
"scheme": {"type": "string"}
"identifier": {"$ref": "#/definitions/identifier"},
"scheme": {"$ref": "#/definitions/scheme"}
}
}
}
Expand All @@ -538,15 +528,15 @@
"type": "string",
"description": "A reference string."
},
"identifier": {"type": "string"},
"scheme": {"type": "string"}
"identifier": {"$ref": "#/definitions/identifier"},
"scheme": {"$ref": "#/definitions/scheme"}
}
}
}
}
},

"metaext": {
"ext": {
"type": "object",
"description": "Configured additional metadata",
"propertyNames": {
Expand Down Expand Up @@ -596,8 +586,7 @@
"additionalProperties": false,
"properties": {
"created_by": {"$ref": "#/definitions/agent"},
"on_behalf_of": {"$ref": "#/definitions/agent"},
"contact": {"$ref": "#/definitions/agent"}
"on_behalf_of": {"$ref": "#/definitions/agent"}
}
},

Expand All @@ -617,11 +606,6 @@
"type": "boolean"
},

"contact": {
"description": "Enable the contact feature to contact owners.",
"type": "boolean"
},

"owned_by": {
"description": "List of user IDs that are owners of the record.",
"type": "array",
Expand Down Expand Up @@ -688,25 +672,10 @@
}
},

"system": {
"type": "object",
"description": "System information.",
"properties": {
"notes": {
"type": "array",
"items":{
"type": "object",
"properties": {
"created_by": {"$ref": "#/definitions/agent-user"},
"note": {"type": "string"},
"timestamp": {
"description": "ISO8601 formatted date time stamp.",
"type": "string",
"format": "date-time"
}
}
}
}
"notes": {
"type": "array",
"items":{
"type": "string"
}
}
}
Expand Down
30 changes: 9 additions & 21 deletions tests/records/full-record.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
"conceptid": "12345-abcde",
"pid": {
"pk": 1,
"pid_type": "recid",
"obj_type": "rec",
"status": "R"
},
"conceptpid": {
"pk": 2,
"pid_type": "recid",
"obj_type": "rec",
"status": "R"
},
"pids": {
Expand Down Expand Up @@ -59,8 +55,7 @@
"title": "InvenioRDM",
"additional_titles": [{
"title": "a research data management platform",
"type": "subtitle",
"lang": "en"
"type": "subtitle"
}],
"publisher": "InvenioRDM",
"publication_date": "2018/2020-09",
Expand Down Expand Up @@ -118,8 +113,7 @@
"description": "Test",
"additional_descriptions": [{
"description": "Bla bla bla",
"type": "methods",
"lang": "en"
"type": "methods"
}],
"locations": [{
"point": {
Expand All @@ -143,12 +137,12 @@
}
}],
"references": [{
"reference_string": "Nielsen et al,..",
"reference": "Nielsen et al,..",
"identifier": "101.234",
"scheme": "doi"
}]
},
"metaext": {
"ext": {
"dwc:collectionCode": "abc",
"dwc:collectionCode2": 1.1,
"dwc:collectionCode3": true,
Expand All @@ -165,7 +159,6 @@
"access": {
"metadata": true,
"files": false,
"contact": true,
"owned_by": [{
"user": 1
}],
Expand All @@ -188,16 +181,11 @@
"description": "File containing the data.",
"order": "1",
"default_preview": true,
"file_id": "445aaacd-9de1-41ab-af52-25ab6cb93df7"
"identifier": "445aaacd-9de1-41ab-af52-25ab6cb93df7"
}]
},
"system": {
"notes": [{
"note": "Under investigation for copyright infringement.",
"created_by": {
"user": 1
},
"timestamp": "2020-01-01T00:00:00+0000"
}]
}

"notes": [
"Under investigation for copyright infringement."
]
}

0 comments on commit c6b17cf

Please sign in to comment.