diff --git a/README.md b/README.md index 4571168..646ed45 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,8 @@ This will read `values.yaml`, set draft version to `2020-12` and save outpout to ### Extended +#### Multiple values files + Merge multiple values files, set json-schema draft version explicitly and save output to `my.schema.json`: `values_1.yaml` @@ -213,6 +215,8 @@ Output will be something like this: } ``` +#### Root JSON object properties + Adding ID, title and description to the schema: `basic.yaml` diff --git a/docs/README.md b/docs/README.md index 4cb37d9..db5a791 100644 --- a/docs/README.md +++ b/docs/README.md @@ -39,6 +39,7 @@ The following annotations are supported: * [required](#required) * [patternProperties](#patternproperties) * [additionalProperties](#additionalproperties) + * [$id](#$id) * [Meta-Data Annotations](#meta-data-annotations) * [title and description](#title-and-description) * [default](#default) @@ -417,6 +418,35 @@ image: # @schema additionalProperties: false } ``` +### $id + +String. [section 8.2.1](https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.1) + +```yaml +image: # @schema $id: https://example.com/schema.json + repository: nginx + tag: latest + pullPolicy: Always +``` + +```json +"image": { + "$id": "https://example.com/schema.json", + "properties": { + "pullPolicy": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "type": "object" +} +``` + ## Meta-Data Annotations ### title and description @@ -427,9 +457,6 @@ String. [section 9.1](https://json-schema.org/draft/2020-12/json-schema-validati fullnameOverride: bar # @schema title: My title ; description: My description ``` -```json -``` - ```json "fullnameOverride": { "title": "My title",