What's Changed
See: Upgrade helm schema
from v2.2 to v2.3
Added
-
feat: support '.kyaml' extension when bundling local files by @applejag in #243
It already supported
$ref: foo.yaml
and$ref: foo.yml
, wherehelm schema
bundling would automatically use a YAML parser.
Now, it will also use the YAML parser for$ref: foo.kyaml
.By default on other file extensions
helm schema
will keep using the JSON parser instead. -
feat: Add
mergeProperties
to combine maps intoadditionalProperties
by @applejag in #252Allows using maps with arbitrary keys, such as:
configs: # @schema mergeProperties foo: lorem: "ipsum" bar: hello: "world"
Instead of generating a schema that has
configs.foo.lorem
&configs.bar.hello
, it will instead generate a schema ofconfigs.*.lorem
&configs.*.hello
usingadditionalProperties
in the JSON schema. -
feat: Add JSON Schema for the
.schema.yaml
config file by @applejag in #261If you want editor support when editing your
.schema.yaml
config files then you can add this comment to the start of the file:# yaml-language-server: $schema=https://github.com/losisin/helm-values-schema-json/raw/refs/heads/main/config.schema.json
-
feat: Support all JSON Schema keywords in internal data structure by @applejag in #264
This does not add support for overriding all schema keywords using
# @schema
annotation comments, but it does add support insidehelm schema
's internal data structure.This makes a difference when bundling other schemas, as before this release,
helm schema
would not be able to bundle all of the keywords used in the referenced schema.In other words, if you bundle a
$ref
that uses keywords likeif
,format
,deprecated
, etc; then the resulting bundled schema will now retain those keywords.
Fixed
-
fix: noAdditionalProperties broke chart usage as dependency by @applejag in #255
To fix this, we now include a
global
property by default (unless you defined one yourself):diff --git a/testdata/noAdditionalProperties.schema.json b/testdata/noAdditionalProperties.schema.json index e7b77fc..9a4eb16 100644 --- a/testdata/noAdditionalProperties.schema.json +++ b/testdata/noAdditionalProperties.schema.json @@ -1,35 +1,43 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { + "global": { + "description": "Global values shared between all subcharts", + "$comment": "Added automatically by 'helm schema' to allow this chart to be used as a Helm dependency, as the `additionalProperties` setting would otherwise collide with Helm's special 'global' values key.", + "type": [ + "object", + "null" + ] + }, "object": { "type": "object", "additionalProperties": false },
-
fix: Bundle should update
$ref
when loaded subschema uses$id
by @applejag in #253
Updated
- build(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in #249
- build(deps): bump securego/gosec from 2.22.7 to 2.22.8 by @dependabot[bot] in #250
- build(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.0 by @dependabot[bot] in #267
Docs
Other
- Fix typos by @applejag in #241
- Fix goreleaser build warning by @applejag in #242
- chore: update year in licence by @losisin in #245
- chore: refactor tests to use yamlutil more by @applejag in #257
- chore: lint github actions using zizmor & actionlint by @applejag in #259
- chore: refactor tests to use google/go-cmp instead of testify's diff by @applejag in #258
Full Changelog: v2.2.1...v2.3.0