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
Question: Approaches/Possibilities around hosting cnab-spec JSON schemas #15
Comments
One way to do it would be to add cnab-spec as a git submodule which Netlify supports. Then it will show up as a subdirectory and we can pull those files in and publish them as static assets using Hugo like we normally do. |
I like @carolynvs suggestion - if we can do this with submodules that would be great. I've previously used things like Gulp to import files from other repos into a Hugo site during the build process with Netlify. Not the cleanest approach though. Spec UpdatesWould a JSON Web View@vdice does this proposal mean serving the json schema in a webpage on cnab.io? I.e. wrapping it in some sort of UI - or simply hosting the file as is? |
I think we can add a webhook for our cnab.io build to the cnab-spec repo. So when the cnab-spec repo gets new commits on master, it will trigger the webhook for a netlify build of the cnab.io website. |
We absolutely need to host the schema json files as-is. So that people can download the spec automatically and use it to validate their bundles against them. If we decide to have human readable representations of the spec later on, that's up to us. 😀 |
Yup, ditto ^^. Thanks, @flynnduism ! |
I'm wondering if we could reuse spiffe.io as identitfication framework because it provide end to end validation process. |
For now, can we create redirects that send requests to https://raw.githubusercontent.com/cnabio/cnab-spec/cnab-core-1.0/schema/definitions.schema.json and similar? |
@technosophos good idea; I'll take a look at our config and see if this is possible. |
There is a need to host the canonical CNAB Spec JSON schema files existing in the schema directory of the deislabs/cnab-spec repository via pages under this
cnab.io
domain. See cnabio/cnab-spec#241, or more specifically, cnabio/cnab-spec#241 (comment).Some of the current schemas (
claim.schema.json
) already include others via$ref
references. When third-party/remote schema validation is attempted (say, CNAB tools that wish to verify theirClaim
object aligns with the claims schema), the validation will need to fetch any/all$ref
references. The references (which match schema$id
s) currently take the form ofhttp://cnab.io/v1/claims.schema.json
,http://cnab.io/v1/bundle.schema.json
, etc.Therefore, I'm wondering what approaches we have to hosting these files from this repo/on the
cnab.io
website? Canhugo
fetch and host files from a remote repository? Do we need to add a pre-build step tocurl
or otherwise fetch these files instead? Or, should the files be hosted from thecnab-spec
repo itself, say, via a GH Pages mechanism, but with some sort of alias/redirection such that the aforementioned URIs result?cc @flynnduism for advice/brainstorming
The text was updated successfully, but these errors were encountered: