- is
schemaVersion
required? - If
schemaVersion
is not required, what is the expected behaviour? - The example in the spec has a
uri
field for images, but the spec doesn't mention this field? - For field selectors section referring to other specs (like the rough JsonPath, JSON Pointer - RFC6901 and XPath) might be wise
- Should
invocationImages
be required? - Should
additionalProperties
be allowed that are not defined in the spec? string, int, boolean
forparameters.type
shortensint
but doesn't shortenboolean
Last active
December 31, 2018 11:11
-
-
Save garethr/5e45b35bff950ad3b62dd98fe592f3d3 to your computer and use it in GitHub Desktop.
CNAB JSON Schema and questions based on the current specification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/schema#", | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"schemaVersion": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"version": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"keywords": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"maintainers": { | |
"type": "array", | |
"items": [ | |
{ | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"url": { | |
"type": "string" | |
} | |
} | |
} | |
] | |
}, | |
"invocationImages": { | |
"type": "array", | |
"items": [ | |
{ | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"imageType": { | |
"type": "string", | |
"default": "oci" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"digest": { | |
"type": "string" | |
}, | |
"size": { | |
"type": "string" | |
}, | |
"platform": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"architecture": { | |
"type": "string" | |
}, | |
"os": { | |
"type": "string" | |
} | |
} | |
}, | |
"mediaType": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"image" | |
] | |
} | |
] | |
}, | |
"images": { | |
"type": "array", | |
"items": [ | |
{ | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"description": { | |
"type": "string" | |
}, | |
"imageType": { | |
"type": "string", | |
"default": "oci" | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"digest": { | |
"type": "string" | |
}, | |
"size": { | |
"type": "integer" | |
}, | |
"platform": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"architecture": { | |
"type": "string" | |
}, | |
"os": { | |
"type": "string" | |
} | |
} | |
}, | |
"mediaType": { | |
"type": "string" | |
}, | |
"refs": { | |
"type": "array", | |
"items": [ | |
{ | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"path": { | |
"type": "string" | |
}, | |
"field": { | |
"type": "string" | |
}, | |
"mediaType": { | |
"type": "string" | |
} | |
} | |
} | |
] | |
} | |
}, | |
"required": [ | |
"image" | |
] | |
} | |
] | |
}, | |
"parameters": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"type": { | |
"type": "string", | |
"enum": ["string", "int", "boolean"] | |
}, | |
"required": { | |
"type": "boolean" | |
}, | |
"defaultValue": { | |
"anyOf": [ | |
{"type": "string"}, | |
{"type": "integer"}, | |
{"type": "boolean"}, | |
{"type": "null"} | |
] | |
}, | |
"allowedValues": { | |
"type": "array" | |
}, | |
"minValue": { | |
"type": "integer" | |
}, | |
"maxValue": { | |
"type": "integer" | |
}, | |
"minLength": { | |
"type": "integer" | |
}, | |
"maxLength": { | |
"type": "integer" | |
}, | |
"metadata": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"description": { | |
"type": "string" | |
} | |
} | |
}, | |
"destination": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"env": { | |
"type": "string" | |
}, | |
"path": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"type" | |
] | |
} | |
}, | |
"credentials": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"path": { | |
"type": "string" | |
}, | |
"env": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"actions": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"modifies": { | |
"type": "boolean" | |
} | |
} | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"version", | |
"invocationImages" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment