GFDRR / rdls-spreadsheet-template

A template for entering Risk Data Library Standard (RDLS) metadata in spreadsheet format
3 stars 0 forks source link

Links tab #16

Closed stufraser1 closed 9 months ago

stufraser1 commented 9 months ago

The 'links' tab self-populates describedBy information with the URL of the schema, indicating the version and should not be adjusted by the user. Would it be better to hide this tab, or remove it altogether and have the conversion code add and populate these fields into the json based on the schema being used version. Could the json creator also add a field that states the version number on its own, e.g., '0.2'? This would be useful to reference in the WB data catalog, but if this is not posisble then the URL is OK, as long as it is always in the json file.

duncandewhurst commented 9 months ago

The links tab is already hidden, at least when I open any of the templates in the repo using LibreOffice or Google Sheets. Could you double-check that you didn't accidentally unhide it?

The schema is used to generate the spreadsheet template, including the formula that populates the schema URL in the links tab, so it will be automatically updated if a different version of the schema is used to generate the template. I prefer this approach to implementing separate code in the conversion tool to add the field, because it removes the risk of the wrong version of the schema being declared.

Declaring the schema URL in links is the standards-compliant (from JSON Hyper Schema) method of declaring the version of the schema that describes the data. It is preferable to using a version number field because users and tools can fetch the schema from the URL, whereas with a version field, they would need to know where to go and look up the version number in order to find the schema.

The validation rules in the schema mean that the schema URL must always be declared in the first item in the links array in order for data to be valid so the schema URL will always appear in the same place in valid RDLS data.

In terms of showing the version number in the WB Data Catalog, it can be derived from the URL component following https://docs.riskdatalibrary.org/en/, e.g. for https://docs.riskdatalibrary.org/en/0__2__0/rdls_schema.json it is version 0.2.

Let me know if I missed something or if there's a use case for a 'plain' version field that can't be met from the schema URL - happy to discuss.