-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What should deprecation look like in the schema. #401
Comments
Sorry for delay in reviewing this. This looks like a good approach. The one other thing we might have to consider is how to deprecate codelist entries. |
I've just been working on the parties extension - and wanted to check at what level deprecation needs to be applied. Essentially:
In the schema merge patch here I've included the properties that were in Is this the correct way to do this? How will CoVE report this deprecation? |
Currently CoVE doesn't handle this. We use jsonref. It looks like it would be fairly straightfoward to get at this info - http://jsonref.readthedocs.io/en/latest/#jsonref.JsonRef.__reference__ |
@Bjwebb Could you add handling this to the next CoVE sprint? |
I've added this @timgdavies and we can discuss details when we speak later |
CoVE now supports the deprecation key on the referencing object. For the schema viewer, it seems we have two options:
|
I think we should do both, since the updated descriptions don't 'leap out' in the schema viewer. |
The deprecation policy has been updated and included in the validator. We'll continue to work on documentation improvement for the display of deprecation information. |
This is related to #367 but this more how to technically mark parts of the JSON schema as deprecated.
We need to consider how the validator reports these warnings.
A simple boolean field "deprecated" could be added to any JSON Schema field description, however this may not provide enough information to both the future schema maintainers and the user who has used a deprecated property.
I would recommend something like discussed here but with a deprecatedVersion key instead. So we make a deprecated object with a description and deprecatedVersion keys.
i.e say we are deprecating initiation type
Deprecated version is useful as it tells the user and the schema maintainers when it was deprecated, so that it will be easier to remember to remove it at some point.
Description will be good for feedback in the validator and can also provide alternatives, or suggestions on what the best approach is now.
Having it as an object also means some future proofing if we want to add more structured information as to why the deprecation has happened.
The text was updated successfully, but these errors were encountered: