mirror of https://github.com/k3d-io/k3d
add: schema versions in-repo to link to from schemastore.org (#942)
- embed a versions file in the k3d repo that links to the existing config schemas as per https://github.com/SchemaStore/schemastore/pull/2057#issuecomment-1024470105 - inspired by and mostly copied from https://github.com/ory/kratos/blob/master/.schema/version.schema.json 🙏pull/943/head
parent
aec4507db8
commit
f004535ac5
@ -0,0 +1,74 @@ |
||||
{ |
||||
"$id": "https://github.com/rancher/k3d/tree/main/pkg/config/config.versions.meta.schema.json", |
||||
"$schema": "http://json-schema.org/draft-07/schema#", |
||||
"title": "The meta schema for k3d's config version schemas.", |
||||
"type": "object", |
||||
"allOf": [ |
||||
{ |
||||
"$ref": "http://json-schema.org/draft-07/schema#" |
||||
}, |
||||
{ |
||||
"properties": { |
||||
"oneOf": { |
||||
"type": "array", |
||||
"items": { |
||||
"type": "object", |
||||
"required": ["allOf"], |
||||
"additionalProperties": false, |
||||
"properties": { |
||||
"allOf": { |
||||
"type": "array", |
||||
"additionalItems": false, |
||||
"minItems": 2, |
||||
"items": [ |
||||
{ |
||||
"type": "object", |
||||
"required": [ |
||||
"properties" |
||||
], |
||||
"additionalProperties": false, |
||||
"properties": { |
||||
"properties": { |
||||
"type": "object", |
||||
"required": [ |
||||
"version" |
||||
], |
||||
"additionalProperties": false, |
||||
"properties": { |
||||
"version": { |
||||
"type": "object", |
||||
"required": [ |
||||
"const" |
||||
], |
||||
"additionalProperties": false, |
||||
"properties": { |
||||
"const": { |
||||
"type": "string" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "object", |
||||
"required": [ |
||||
"$ref" |
||||
], |
||||
"additionalProperties": false, |
||||
"properties": { |
||||
"$ref": { |
||||
"type": "string" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
@ -0,0 +1,36 @@ |
||||
{ |
||||
"$id": "https://github.com/rancher/k3d/tree/main/pkg/config/config.versions.schema.json", |
||||
"$schema": "https://raw.githubusercontent.com/rancher/k3d/main/pkg/config/config.versions.meta.schema.json#", |
||||
"title": "All k3d config versions", |
||||
"type": "object", |
||||
"oneOf": [ |
||||
{ |
||||
"allOf": [ |
||||
{ |
||||
"properties": { |
||||
"version": { |
||||
"const": "v1alpha3" |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"$ref": "https://raw.githubusercontent.com/rancher/k3d/main/pkg/config/v1alpha3/schema.json" |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"allOf": [ |
||||
{ |
||||
"properties": { |
||||
"version": { |
||||
"const": "v1alpha2" |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"$ref": "https://raw.githubusercontent.com/rancher/k3d/main/pkg/config/v1alpha2/schema.json" |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
Loading…
Reference in new issue