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

Validation of extensions and fetching from context URLs #1181

Open
mmccool opened this issue Jun 30, 2021 · 5 comments
Open

Validation of extensions and fetching from context URLs #1181

mmccool opened this issue Jun 30, 2021 · 5 comments
Assignees
Labels
Defer to TD 2.0 Semantics Semantics-related issues Testing validation Topic related to Normative Parsing, Validation, Consumption

Comments

@mmccool
Copy link
Contributor

mmccool commented Jun 30, 2021

It would be useful to have a convention to relate context URLs to validation files, including JSON Schemas and SHACL, in addition to ontology files. Also, we should set up the context URLs so that fetching from them produces actual ontology definitions (at least) and our "baseline" context URLs should also satisfy the conventions suggested (via SHOULD) for extensions.

@mmccool mmccool changed the title Validation of extensions Validation of extensions and fetching from context URLs Jun 30, 2021
@mmccool
Copy link
Contributor Author

mmccool commented Jun 30, 2021

Need to define:

  1. How to fetch Schemas (ideally as an extension of SHACL mechanism)
  2. How to merge Schemas (that needs top support mutliple extensions)
  3. Extension schemas should be simple
  4. We need to define a way to catch typos and perhaps disallow "additionalProperties": true in the final schema.

@relu91
Copy link
Member

relu91 commented Jul 1, 2021

Another point:
5. Support for meta-schemas in extensions: some vocabulary may extend JSON schema with domain-specific keywords. In modbus we have to extend json-schema to support other type keywords like int8, uint16, etc.

@AndreaCimminoArriaga
Copy link

I think this will be hard to be done in the @context of a JSON-LD file. Can't we have a field that is an array for the shapes and another for the schemas which content of both is a set of URLs where to find the documents (schemas or shapes) ?

@mmccool
Copy link
Contributor Author

mmccool commented Jul 7, 2021

I have been looking for a specification of how SHACL files are supposed to be distributed. I haven't found anything but do understand there is a convention so if anyone has information on that it would be great, or knows of a contact we can ask...

@mmccool
Copy link
Contributor Author

mmccool commented Jul 7, 2021

Anyway, my general thought was that we would not ADD new things to @context (or the TD/TM), but would define rules for how the various validation files can be fetched given the URL in the @context. Possibilities include:

  1. Content negotation. Using GET on the context URL with a particular content type should fetch the appropriate validation file. One problem is that the separate validation files don't necessarily have separate context types so we might have to use parameters or something to distinguish them (e.g. if you fetch json-ld, well, that could be the ontology, or it could be the shacl file...)
  2. Convention for extending the URL. For example, given a URL https://example.org/myvocab/ in the @context, perhaps we can say that the JSON Schema can always be found at https://example.org/myvocab/schema.json or the like.

We could also do both.

@egekorkan egekorkan added Testing Semantics Semantics-related issues labels Jun 15, 2022
@egekorkan egekorkan added validation Topic related to Normative Parsing, Validation, Consumption Defer to TD 2.0 labels Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defer to TD 2.0 Semantics Semantics-related issues Testing validation Topic related to Normative Parsing, Validation, Consumption
Projects
None yet
Development

No branches or pull requests

5 participants