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

OAS 3.0 initial ontology #3

Open
handrews opened this issue Apr 25, 2023 · 0 comments
Open

OAS 3.0 initial ontology #3

handrews opened this issue Apr 25, 2023 · 0 comments
Assignees

Comments

@handrews
Copy link
Collaborator

The purpose of the ontology is to provide enough information for SHACL to correctly find target nodes and perform validation. The ontology does not need to be complete, and when it is easy to add a triple in the parsing code, that is probably better than trying to infer it through ontology declarations (at least until there is enough running code to run performance tests on inferencing with large API descriptions).

Note that ontologies go in the direction of "if it has properties A, B, and C that define class X, then it is of class X", and are therefore not useful for validation (SHACL performs validation). There is no need to include validation-oriented info in the ontology unless it serves another purpose listed below. See this video for details on OWL vs SHACL usage

For now this needs to document (xsd+rdf+rdfs+possibly some owl2+maybe look at skos):

  • parsed types (corresponding directly to JSON Pointer locations in the API description file)
  • semantic types (entities in the graph used for primary semantic validation; includes some parsed types)
  • sub-types/sub-properties (e.g. the schema will parse each parameter type separately as each has its own schema object, but they are all subtypes of Parameter, which SHACL will need to know)
  • how location information works (do we only map to instance JSON Pointers in the graph, and handle file/line number elsewhere? how much schema location information do we need to retain after schema parsing is done?)
  • anything with a clearly beneficial inferencing impact (meaning it's easier/faster to use inferencing through rdflib than adding the triples in code)

It's unclear at this stage how much the ontology should attempt to describe JSON Schema. There is an RDF ontology for JSON schema draft-07 (I think) in the W3C Web of Things group, which is probably worth adapting if we need such a thing.

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

1 participant