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

Need ability for inheritance on json schema #162

Closed
mprorock opened this issue May 11, 2021 · 8 comments
Closed

Need ability for inheritance on json schema #162

mprorock opened this issue May 11, 2021 · 8 comments
Assignees

Comments

@mprorock
Copy link
Collaborator

In an ideally world we could use allof or similar in JSON Schema to represent a class - subclass relationship - this type of thing is well handled in JSON-LD, less so in JSON Schema. We should pick a best practice on this, and document it, etc.

@mprorock
Copy link
Collaborator Author

for example, in terms of the ag use case, we cannot type check that ppq203 is a subclass of aginspection in the repo

@Therecanbeonlyone1969
Copy link
Contributor

@mprorock
Copy link
Collaborator Author

note: hardening any type enforcement should likely come into play once it is known that the object fully represents the contents of the type - e.g. paper based form that does not change or changes only on a long time scale, and is being digitized (e.g. digital form of a regulatory document)

@OR13
Copy link
Collaborator

OR13 commented Jun 15, 2021

JSON Schema that use inheritance do not generate JSON-LD context properly.

Would be good to get a set of examples we wished were possible on the ticket.

@OR13
Copy link
Collaborator

OR13 commented Aug 31, 2021

We still need examples.

@mprorock
Copy link
Collaborator Author

Per Call: This is resolved via #220

@VladimirAlexiev
Copy link
Contributor

@OR13

JSON Schema that use inheritance do not generate JSON-LD context properly.

JSON Schema does not generate JSON-LD context of its own. So can you please illustrate the problem?

@mprorock

resolved via #220

Can you please explain how this is resolved by pointing to schemas that use inheritance?

I'm asking in relation to 2 of the issues I posted:

@OR13
Copy link
Collaborator

OR13 commented Sep 19, 2022

JSON Schema does not generate JSON-LD context of its own. So can you please illustrate the problem?

We do this in this repo, its part of our build step today:

https://github.com/w3c-ccg/traceability-vocab/blob/main/packages/traceability-schemas/package.json#L17

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

4 participants