github losisin/helm-values-schema-json v2.3.0

2 days ago

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, where helm 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 into additionalProperties by @applejag in #252

    Allows 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 of configs.*.lorem & configs.*.hello using additionalProperties in the JSON schema.

  • feat: Add JSON Schema for the .schema.yaml config file by @applejag in #261

    If 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 inside helm 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 like if, 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

  • docs: update CLI & config usage in README.md by @applejag in #265

Other

Full Changelog: v2.2.1...v2.3.0

Don't miss a new helm-values-schema-json release

NewReleases is sending notifications on new releases.