Skip to content

Commit

Permalink
clear doc headings
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandar Stojanov <[email protected]>
  • Loading branch information
losisin committed Jun 3, 2024
1 parent d4bbc89 commit b89d0ff
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -213,6 +215,8 @@ Output will be something like this:
}
```

#### Root JSON object properties

Adding ID, title and description to the schema:

`basic.yaml`
Expand Down
33 changes: 30 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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",
Expand Down

0 comments on commit b89d0ff

Please sign in to comment.