Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Request for updates to the schemas #24

Open
zachsa opened this issue Oct 21, 2021 · 6 comments
Open

Request for updates to the schemas #24

zachsa opened this issue Oct 21, 2021 · 6 comments

Comments

@zachsa
Copy link

zachsa commented Oct 21, 2021

As I'm drawing forms off the schemas, fields like "description" are helpful in making the forms more pleasant and useable. The more descriptions there are the better - in fact if every field had a description that would be ideal.

This is also helpful for me in finding out what the fields are

@marksparkza
Copy link
Member

Hi Zach,

I've added our metadata schemas to this repository: https://github.com/SAEONData/Open-Data-Platform/tree/main/schema/metadata

I also updated them to use version 2020-12 of the JSON Schema (the only thing that changed was renaming the "definitions" object to "$defs").

My suggestion would be to fork this repo and add/update descriptions as needed - I think it will be easier than going back and forth between us. PR whenever you're ready and I'll review the changes.

It might be worth looking at other keyword annotations in addition to "description" - for example you can also set "title" annotations, and there's a "readOnly" which might be useful in some places (can't think of any offhand right now).

There's more info here about the various "annotation" keywords: https://json-schema.org/understanding-json-schema/reference/generic.html#annotations

@zachsa
Copy link
Author

zachsa commented Oct 25, 2021

Hi Mark,

When I try creating a schema called datacite4-saeon, I get the following error:

ERROR creating metadata records: CKAN validation error: {'__type': 'Validation Error', 'metadata_standard_id': ['Not found: Metadata Standard']}

I need to be able to get a list of possible schemas from the ODP that a user can then select from. When creating a new metadata document the schema name that the user selects needs to be used to create the schema in the odp - so i see that you changed the names of them. But the names need to reflect the possible options for creating a schema.

@zachsa
Copy link
Author

zachsa commented Oct 25, 2021

Also, old metadata records have a schema name in them - for example saeon-datacite-4-3. I have to be able to resolve that name to a json schema, otherwise I can't create a form that makes sense in terms of the existing JSON

@zachsa
Copy link
Author

zachsa commented Oct 25, 2021

Also - if a schema is changed in anyway then the json data will not easily be editable in a form. So once a metadata record has been created via a particular schema, that schema needs to be immutable - even if errors. Otherwise I would need to store that schema to regenerate the form data that originally was captured. which i would prefer not to do

@marksparkza
Copy link
Member

Okay, sorry, this is not going to work for v1 integration.

I have made the https://github.com/SAEONData/ODP-Data repository public - can you please fork that and add descriptions to the schemas there. I will merge them into the v2 schemas in due course.

@zachsa
Copy link
Author

zachsa commented Oct 25, 2021

Okay - I will get to this, but probably only after review from the curation team and once they start using the tool.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants