ga4gh-schemablocks / sb-phenopackets

THIS IS A DRAFT REPOSITORY to write schemablocks using JSON schema and convert this into markdown.
1 stars 0 forks source link

Schema $id should be namespaced #2

Open Relequestual opened 5 years ago

Relequestual commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

theisuru commented 5 years ago

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

mbaudis commented 5 years ago

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 commented 5 years ago

@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.