Skip to content
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

["$id"] declaring a unique identifier to the schema #99

Open
jpradocueva opened this issue Jan 6, 2020 · 2 comments
Open

["$id"] declaring a unique identifier to the schema #99

jpradocueva opened this issue Jan 6, 2020 · 2 comments
Assignees

Comments

@jpradocueva
Copy link

Add to the schema document "sdf-schema.json" a unique identifier ($id) property:

"$id": "http://yourdomain.org/schemas/v1_0/sdf-schema.json"

It is part of the base practice to include this property on each schema.

Points for discussion:

  • by a domain for "onedatamodel"
  • in the URI path - (converted into a URL) - is suggested to add the /versionx_y/

The addition of this "$id": will allow to insert the "$schema": property:

"$schema": "http://yourdomain.org/schemas/v1_0/sdf-schema.json"

inside of each model. This will allow to validate the model against the defined schema "sdf-schema.json".

@mjkoster mjkoster self-assigned this Jan 17, 2020
@cabo
Copy link
Member

cabo commented Jan 29, 2020

Note that a language is defined by syntax and semantics; the language schema is just an expression of the syntax.

We may want to evolve the language schema along with other parts of the language in an upwards compatible way; hardwiring a reference to a file containing an older schema into the models makes it harder to just check them with a newer schema.

In summary, a schema file reference is neither solving the language versioning issue nor would it be a good way to do this if it were.

@jpradocueva
Copy link
Author

@cabo Let's review the original requirement.

I believe that it is important to be able to validate every single model submitted to the registry. This validation should be done against the sdf-schema.json schema. The validation should check for well formed and valid.

Do you agree with this requirement?
How do you suggest that we can meet this requirement?

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

No branches or pull requests

3 participants