-
Notifications
You must be signed in to change notification settings - Fork 99
Update definitions schema to use a bespoke JSON Schema Version #257
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would help if we remind people on the default field as well that they cannot use a number and must use an integer. The text there says RECOMMENDED that a default value be valid against the associated schema really they have to follow schema there and use an integer there as well.
|
|
||
| Definitions have no utility on their own. They enable the runtime to validate parameters and outputs when used in combination with those features. Examples | ||
| of how to use `definitions` along with `parameters` and `outputs` can be seen in the [Parameters](#parameters) and [Outputs](#outputs) sections below. | ||
| of how to use `definitions` along with `parameters` and `outputs` can be seen in the [Parameters](#parameters) and [Outputs](#outputs) sections below. A `definition` must conform to both JSON Schema and Canonical JSON, therefore only `integer` numeric types are supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100 internet points for not including "this is why we can't have nice things". 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Good point! Will update to that. |
…o#257) * Update definitions schema to use integer, remove `number` as a type Fixes cnabio#256 * Incorporate suggestion Signed-off-by: Trishank K Kuppusamy <[email protected]>
Signed-off-by: Trishank K Kuppusamy <[email protected]> overview and table of contents Signed-off-by: Trishank K Kuppusamy <[email protected]> move some text around Signed-off-by: Trishank K Kuppusamy <[email protected]> better TOC; abstract; introduction Signed-off-by: Trishank K Kuppusamy <[email protected]> fix small grammar issue Signed-off-by: Trishank K Kuppusamy <[email protected]> introduce repos Signed-off-by: Trishank K Kuppusamy <[email protected]> add some TODOs about image repos Signed-off-by: Trishank K Kuppusamy <[email protected]> some clarifications(?) Signed-off-by: Trishank K Kuppusamy <[email protected]> break things up a bit Signed-off-by: Trishank K Kuppusamy <[email protected]> simplifying assumption: one image registry <=> one image repo Signed-off-by: Trishank K Kuppusamy <[email protected]> minor language edits Signed-off-by: Trishank K Kuppusamy <[email protected]> WIP on traditional img repos Signed-off-by: Trishank K Kuppusamy <[email protected]> WIP Signed-off-by: Trishank K Kuppusamy <[email protected]> expand ToC Signed-off-by: Trishank K Kuppusamy <[email protected]> defer community image repos Signed-off-by: Trishank K Kuppusamy <[email protected]> some minor fixes Signed-off-by: Trishank K Kuppusamy <[email protected]> introduce idea of gradual security Signed-off-by: Trishank K Kuppusamy <[email protected]> add section on gradual security Signed-off-by: Trishank K Kuppusamy <[email protected]> WIP Signed-off-by: Trishank K Kuppusamy <[email protected]> end here today Signed-off-by: Trishank K Kuppusamy <[email protected]> separate security analysis Signed-off-by: Trishank K Kuppusamy <[email protected]> move things around a bit Signed-off-by: Trishank K Kuppusamy <[email protected]> wrap up traditional img repos Signed-off-by: Trishank K Kuppusamy <[email protected]> add a sentence Signed-off-by: Trishank K Kuppusamy <[email protected]> mention PEPs 458 & 480 for community img repos Signed-off-by: Trishank K Kuppusamy <[email protected]> add a reference Signed-off-by: Trishank K Kuppusamy <[email protected]> draft of signing workflows Signed-off-by: Trishank K Kuppusamy <[email protected]> minor language edits Signed-off-by: Trishank K Kuppusamy <[email protected]> defer a few things Signed-off-by: Trishank K Kuppusamy <[email protected]> one more thing to defer for now Signed-off-by: Trishank K Kuppusamy <[email protected]> add some important considerations Signed-off-by: Trishank K Kuppusamy <[email protected]> minor edits Signed-off-by: Trishank K Kuppusamy <[email protected]> Clarify why bundle.json is mounted in the invocation image (cnabio#228) * clarify why bundle.json is mounted in the invocation image Signed-off-by: Trishank K Kuppusamy <[email protected]> * remove link Signed-off-by: Trishank K Kuppusamy <[email protected]> add a CNAB Registry icon (cnabio#232)  Adds a registry icon, which is a variant of the main CNAB logo. Signed-off-by: Trishank K Kuppusamy <[email protected]> add a CNAB Security icon (cnabio#231) Signed-off-by: Trishank K Kuppusamy <[email protected]> Remove the `immutable` attribute from parameters This removes the `immutable` attribute from parameters per Issue cnabio#229 Signed-off-by: Trishank K Kuppusamy <[email protected]> Remove wording about immutable parameters Signed-off-by: Trishank K Kuppusamy <[email protected]> Remove fields from outputs Signed-off-by: Radu M <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> fix(claim.schema.json): s/underay/underway Signed-off-by: Trishank K Kuppusamy <[email protected]> fix(claim.schema.json): s/descripton/description Signed-off-by: Trishank K Kuppusamy <[email protected]> Adds information about the Specification Freeze (cnabio#238) Signed-off-by: Trishank K Kuppusamy <[email protected]> Update 103-bundle-runtime.md s/Instance/Installation Signed-off-by: Trishank K Kuppusamy <[email protected]> massively simplify 300 Signed-off-by: Trishank K Kuppusamy <[email protected]> terminology updates Signed-off-by: Trishank K Kuppusamy <[email protected]> more fine-grained security levels Signed-off-by: Trishank K Kuppusamy <[email protected]> KISS: break up metadata repositories, signing, verification Signed-off-by: Trishank K Kuppusamy <[email protected]> fix(400-claims.md): add mention of the custom field in a claim (cnabio#255) Signed-off-by: Trishank K Kuppusamy <[email protected]> Update README.md (cnabio#260) Remove the OCI mailing list info Signed-off-by: Trishank K Kuppusamy <[email protected]> Update definitions schema to use a bespoke JSON Schema Version (cnabio#257) * Update definitions schema to use integer, remove `number` as a type Fixes cnabio#256 * Incorporate suggestion Signed-off-by: Trishank K Kuppusamy <[email protected]> fix: corrected a typo Signed-off-by: Matt Butcher <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> clearify wording on writeOnly Signed-off-by: Matt Butcher <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> clarify what to do when multiple invocation images match a pattern Signed-off-by: Matt Butcher <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> fix: clarify the wording on stateless actions Signed-off-by: Matt Butcher <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> Add clarification to `readOnly` definition Signed-off-by: Trishank K Kuppusamy <[email protected]> Clarify parameters are encoded as json strings Signed-off-by: Trishank K Kuppusamy <[email protected]> Clarify defaults for outputs and parameters (cnabio#270) * Clarify how required and default interact * Clarify output defaults Signed-off-by: Trishank K Kuppusamy <[email protected]> Removed extra were Signed-off-by: Trishank K Kuppusamy <[email protected]> explain how claims treat parameters and credentials differently, and why (cnabio#267) Signed-off-by: Matt Butcher <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> Update contentDigest wording to clarify behavior (cnabio#261) * Update contentDigest wording to clarify behavior Fixes: cnabio#254 * Update markup for contentDigest * Update comments Signed-off-by: Trishank K Kuppusamy <[email protected]> Clarify upgrade version handling responsibility Signed-off-by: Christopher Crone <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> Improve wording Signed-off-by: Christopher Crone <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> Fix OWF Contributor License Agreement link (cnabio#276) Signed-off-by: Trishank K Kuppusamy <[email protected]> Clarify failed action handling (cnabio#274) Signed-off-by: Christopher Crone <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> CNAB Core 1.0 GA This commit marks the Working Group Acceptance (GA) of the CNAB Core 1.0 specification. Signed-off-by: Matt Butcher <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> Final Approval for CNAB Core 1.0 Specification This commit indicates that the CNAB specification is now a published final version. Signed-off-by: Trishank K Kuppusamy <[email protected]> Update README.md Co-Authored-By: Carolyn Van Slyck <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> Update 100-CNAB.md Co-Authored-By: Carolyn Van Slyck <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> Add mailing list (cnabio#283) Signed-off-by: Trishank K Kuppusamy <[email protected]> Bump bundle schemaVersion to 1.0.0 (cnabio#278) Signed-off-by: Christopher Crone <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> Update 103-bundle-runtime.md fixing the misleading description in the example of setting parameter value in file. Signed-off-by: Trishank K Kuppusamy <[email protected]> Define host environment Signed-off-by: Matt Butcher <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> Make status.json a CNAB Output Signed-off-by: Trishank K Kuppusamy <[email protected]> fix: remove an unnecessary section Signed-off-by: Matt Butcher <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> add bundleReference to the claim specification Signed-off-by: Matt Butcher <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> Update 400-claims.md Co-Authored-By: Glyn Normington <[email protected]> Signed-off-by: Trishank K Kuppusamy <[email protected]> address @vdice feedback Signed-off-by: Trishank K Kuppusamy <[email protected]> remove .gitignore Signed-off-by: Trishank K Kuppusamy <[email protected]> fix links per @chris-crone feedback Signed-off-by: Trishank K Kuppusamy <[email protected]>
Revert the changes in cnabio#257 which updated the spec to disallow non-integer values. We misunderstood the canonical json spec and were using a library that didn't support numbers. I have an open PRs for cnab-go which tested out switching to a library that support numbers in canonical json and it works great. * cnabio/cnab-go#247 * cnabio/cnab-go#248 So now fields such as default, maximum, minimum, etc can use numbers again! Signed-off-by: Carolyn Van Slyck <[email protected]>
* Allow numbers again Revert the changes in #257 which updated the spec to disallow non-integer values. We misunderstood the canonical json spec and were using a library that didn't support numbers. I have an open PRs for cnab-go which tested out switching to a library that support numbers in canonical json and it works great. * cnabio/cnab-go#247 * cnabio/cnab-go#248 So now fields such as default, maximum, minimum, etc can use numbers again! Signed-off-by: Carolyn Van Slyck <[email protected]> * Include integer and number in primitives list Signed-off-by: Carolyn Van Slyck <[email protected]>
I originally tried to just reference the pieces of JSON schema we wanted, replacing things but since there are internal references inside of the json schema itself, it seemed cleaner to make a standalone schema, called
definitions.schema.jsonand reference that.Summary:
numberbefore are integernumberas a type, only integerFixes #256