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

Schema $id should be namespaced #2

Open
Relequestual opened this issue Jun 12, 2019 · 7 comments
Open

Schema $id should be namespaced #2

Relequestual opened this issue Jun 12, 2019 · 7 comments

Comments

@Relequestual
Copy link

Currently the schema $id is given as a URL of schemablocks at root.
For example: https://github.com/ga4gh-schemablocks/blocks-json-schema/blob/e3d0e382cf245c544427c32b8633ab8cda70f624/src/yaml/Individual.yaml#L1-L3

I would suggest in stead doing using something like...
https://schemablocks.org/schemas/ga4gh/Individual/v0.0.1
Although my preference would be...
https://ga4gh.org/schemas/schemablocks/Individual/v0.0.1

@mbaudis
Copy link
Contributor

mbaudis commented Jun 18, 2019

A problem here may be the handling of address forwarding by GA4GH, which IMO is still an unsolved issue.

Also, something like

https://schemablocks.org/schemas/ga4gh/Individual/v0.0.1

would allow to do

https://schemablocks.org/schemas/playground/NewConcept/v0.0.1

... thereby identifying "GA4GH" concepts versus development versions.

@theisuru
Copy link
Contributor

As @Relequestual and @mbaudis suggested, for the time being, I will update the namespace to
https://schemablocks.org/schemas/ga4gh/Individual/v0.0.1

Keeping this thread open for final agreement.

@Relequestual
Copy link
Author

As a reminder, the $id of a schema is not assumed to be network addressable. It is purely an identifier for reference resolution purposes.

@mbaudis
Copy link
Contributor

mbaudis commented Jun 24, 2019

Wouldn't it then be org.schemablocks.schemas/ga4gh/Individual/v0.0.1?

@theisuru
Copy link
Contributor

I guess, having a network accessible identifier wouldn't hurt

@mbaudis
Copy link
Contributor

mbaudis commented Jun 24, 2019

Pretty standard to use reverse domain name notation, though this does not guarantee to resolve https://en.wikipedia.org/wiki/Reverse_domain_name_notation

@theisuru
Copy link
Contributor

theisuru commented Jul 3, 2019

@Relequestual
If $id is not network accessible, how do validators locate schema referenced from $ref keyword. I understand it's left for implementors. But if we want our schemas to conveniently work with validators, I feel like having network accessible $id is a must.

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