Skip to content

Commit

Permalink
Merge pull request #160 from OpenEnergyPlatform/feature-40-mandatory
Browse files Browse the repository at this point in the history
Specify the mandatory fields to the json schema
  • Loading branch information
jh-RLI authored Oct 15, 2024
2 parents 0a4cd7c + c05940d commit 5900bab
Show file tree
Hide file tree
Showing 5 changed files with 346 additions and 344 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Here is a template for new release sections

- Add roles to contributors [(#157)](https://github.com/OpenEnergyPlatform/oemetadata/pull/157)

- Add mandatory fields to the json schema (Iron Badge) [(#160)](https://github.com/OpenEnergyPlatform/oemetadata/pull/160)

### Changed

Expand Down
12 changes: 7 additions & 5 deletions metadata/v200_draft/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
<a href="https://openenergy-platform.org/"><img align="right" width="100" height="100" src="https://avatars2.githubusercontent.com/u/37101913?s=400&u=9b593cfdb6048a05ea6e72d333169a65e7c922be&v=4" alt="OpenEnergyPlatform"></a>


# Open Energy Metadata (OEM) - Latest-Release
# Open Energy Metadata (OEMetadata) - Latest-Release

This version of the OEM represents the latest released version. This release is fully integrated
into the OEP.
This version of the OEMetadata represents the latest released version.
This release is fully integrated into the OEP.

The OEM contains the following files:
The OEMetadata contains the following files:

* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/template.json) contains an empty metadata string with all fields.
* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/metadata_key_description.md) contains a full description of each metadata key and an example.
* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/example.json) contains a basic metadata example.
* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/metadata_key_description.md) contains a full description of each metadata key and an example.
* [context.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/context.json) contains the references of metadata keys in ontology terms.
* [schema.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/schema.json) contains the json schema for the metadata.

For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/CHANGELOG.md).
55 changes: 28 additions & 27 deletions metadata/v200_draft/build_source/schemas/general.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"type": "object",
"properties": {
"name": {
"description": "File name or database table name",
"example": "oep_metadata_table_example_v160",
"description": "A filename or database conform table name.",
"example": "oemetadata_table_example_v20",
"type": [
"string",
"null"
],
"badge": "Silver",
"badge": "Iron",
"title": "Name"
},
"title": {
"description": "A Human readable, full title , including author.",
"example": "RLI - OEMetadata - Metadata example table",
"description": "A human readable table name.",
"example": "OEMetadata example table - Version 2.0",
"type": [
"string",
"null"
Expand All @@ -24,8 +24,8 @@
"title": "Title"
},
"id": {
"description": "Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI).",
"example": "https://example.com",
"description": "A unique identifier (URI/UUID/DOI) for the table or file.",
"example": "http://openenergyplatform.org/dataedit/view/model_draft/oemetadata_table_example_v20",
"type": [
"string",
"null"
Expand All @@ -35,8 +35,8 @@
"readonly": true
},
"description": {
"description": "A description of the package. It should be usable as summary information for the entire package that is described by the metadata.",
"example": "Example table used to illustrate the metadata structure and meaning.",
"description": "A description of the table. It should be usable as summary information for the table that is described by the metadata.",
"example": "Example table used to illustrate the oemetadata structure and meaning.",
"type": [
"string",
"null"
Expand All @@ -45,7 +45,7 @@
"title": "Description"
},
"subject": {
"description": "Reference the topic of the resource in ontology terms",
"description": "References to the topics of the resource in ontology terms.",
"type": "array",
"items": {
"type": "object",
Expand All @@ -61,7 +61,7 @@
"title": "Name"
},
"path": {
"description": "The URI of the class.",
"description": "The URI of the ontology class.",
"example": "https://openenergy-platform.org/ontology/oeo/OEO_00000150",
"type": [
"string",
Expand All @@ -79,12 +79,12 @@
"badge": "Platinum",
"title": "Subject"
},
"language": {
"description": "List of languages used within the described data structures (e.g. titles, descriptions). Standard: IETF (BCP47).",
"languages": {
"description": "A list of languages used within the described data structures (e.g. titles, descriptions) or metadata.",
"example": "[en-GB, de-DE, fr-FR]",
"type": "array",
"items": {
"description": "Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47)",
"description": "The language keys must follow the Standard IETF (BCP47) and can be repeated if more languages are used.",
"example": "en-GB",
"type": [
"string",
Expand All @@ -94,15 +94,15 @@
"title": "Language"
},
"badge": "Gold",
"title": "Language"
"title": "Languages"
},
"keywords": {
"description": "A list of string keywords to assist users searching for the package in catalogs.",
"example": "[example, template, test]",
"example": "[example, ODbL-1.0, RLI, NFDI4Energy]",
"type": "array",
"items": {
"description": "A keyword to assist users searching for the package in catalogs.",
"example": "template",
"description": "The keyword are used and managed in the OEP as table tags.",
"example": "example",
"type": [
"string",
"null"
Expand All @@ -114,14 +114,14 @@
"title": "Keywords"
},
"publicationDate": {
"description": "Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD)",
"example": "2019-02-06",
"description": "A date of publication. The date format is ISO 8601 (YYYY-MM-DD).",
"example": "2024-10-15",
"type": [
"string",
"null"
],
"badge": "Bronze",
"title": "Publication date",
"title": "Publication Date",
"format": "date"
},
"embargoPeriod": {
Expand All @@ -136,17 +136,17 @@
"null"
],
"badge": "Bronze",
"title": "Embargo period start"
"title": "Embargo Period Start"
},
"end": {
"description": "The end date of the embargo period. This is the intended release date.",
"description": "The end date of the embargo period. This is the intended publication date.",
"example": "2025-01-01",
"type": [
"string",
"null"
],
"badge": "Bronze",
"title": "Embargo period end (Publication date)"
"title": "Embargo Period End (Publication Date)"
},
"isActive": {
"description": "A boolean key that indicates if the embargo period is currently active. Must be changed to False on the embargo period end date.",
Expand All @@ -156,12 +156,13 @@
"null"
],
"badge": "Bronze",
"title": "Active embargo period"
"title": "Embargo Period is Active "
}
},
"badge": "Bronze",
"title": "Embargo period",
"title": "Embargo Period",
"additionalProperties": false
}
}
},
"required": ["name"]
}
25 changes: 13 additions & 12 deletions metadata/v200_draft/build_source/schemas/general_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,36 @@
"type": "object",
"properties": {
"name": {
"description": "Collection name",
"example": "my_oep_collection",
"description": "A filename or database conform collection name.",
"example": "oemetadata",
"type": [
"string",
"null"
],
"badge": "Silver",
"title": "Collection name"
"badge": "Iron",
"title": "Collection Name"
},
"title": {
"description": "A Human readable, full title , including author.",
"example": "RLI - OEMetadata - Metadata example table",
"description": "A human readable collection name.",
"example": "OEMetadata",
"type": [
"string",
"null"
],
"badge": "Silver",
"title": "Title"
"title": "Collection Title"
},
"collectionId": {
"description": "A Uniform Resource Identifier (URI) that links the resource collection.",
"example": "https://todo",
"id": {
"description": "A unique identifier (UUID/DOI) for the collection.",
"example": "https://databus.openenergyplatform.org/oeplatform/supply",
"type": [
"string",
"null"
],
"badge": null,
"badge": "Silver",
"title": "Collection identifier",
"readonly": true
}
}
},
"required": ["name"]
}
Loading

0 comments on commit 5900bab

Please sign in to comment.