Skip to content

Commit

Permalink
add documentation and bump version to 1.5.0
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandar Stojanov <[email protected]>
  • Loading branch information
losisin committed Jun 24, 2024
1 parent b24cc50 commit 6535634
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/losisin/helm-values-schema-json
rev: v1.4.1
rev: v1.5.0
hooks:
- id: helm-schema
args:
Expand Down
38 changes: 33 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ First [install pre-commit](https://pre-commit.com/#install) and then create or u
```yaml
repos:
- repo: https://github.com/losisin/helm-values-schema-json
rev: v1.4.1
rev: v1.5.0
hooks:
- id: helm-schema
args: ["-input", "values.yaml"]
Expand Down Expand Up @@ -108,7 +108,35 @@ Usage: helm schema [options...] <arguments>
JSON schema title
```

### Basic
### Configuration file

This plugin will look for it's configuration file called `schema.yaml` in the current working directory. All options available from CLI can be set in this file. Example:

```yaml
# Required
input:
- schema.yaml
draft: 2020
indent: 4
output: values.schema.json
schemaRoot:
id: https://example.com/schema
title: Helm Values Schema
description: Schema for Helm values
additionalProperties: true
```

Then, just run the plugin without any arguments:

```bash
$ helm schema
```

### CLI

#### Basic

In most cases you will want to run the plugin with default options:

Expand All @@ -118,9 +146,9 @@ $ helm schema -input values.yaml

This will read `values.yaml`, set draft version to `2020-12` and save outpout to `values.schema.json`.

### Extended
#### Extended

#### Multiple values files
##### Multiple values files

Merge multiple values files, set json-schema draft version explicitly and save output to `my.schema.json`:

Expand Down Expand Up @@ -217,7 +245,7 @@ Output will be something like this:
}
```

#### Root JSON object properties
##### Root JSON object properties

Adding ID, title and description to the schema:

Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "schema"
version: "1.4.1"
version: "1.5.0"
usage: "generate values.schema.json from values yaml"
description: "Helm plugin for generating values.schema.json from multiple values files."
ignoreFlags: false
Expand Down
1 change: 1 addition & 0 deletions schema.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Required
input:
- schema.yaml

Expand Down

0 comments on commit 6535634

Please sign in to comment.