Skip to content
Novus Examples
json3 KB

Helm values.schema.json

The values.schema.json that validates the paired Helm values files: a 2020-12 JSON Schema with $defs, $ref, enums, quantity patterns, and additionalProperties: false on nested objects. Validates the defaults and rejects a values file with an unknown image key.

Preview — first 50 linesjson
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.invalid/charts/orders/values.schema.json",
  "title": "orders chart values",
  "description": "Validation schema for the orders chart values files. Fictional; validates the paired defaults and production overrides.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "replicaCount",
    "image",
    "service"
  ],
  "properties": {
    "replicaCount": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "image": {
      "type": "object",
      "required": [
        "repository"
      ],
      "properties": {
        "repository": {
          "type": "string",
          "pattern": "^registry\\.example\\.invalid/"
        },
        "tag": {
          "type": "string"
        },
        "pullPolicy": {
          "enum": [
            "Always",
            "IfNotPresent",
            "Never"
          ]
        }
      },
      "additionalProperties": false
    },
    "service": {
      "type": "object",
      "required": [
        "type",
        "port"
      ],
      "properties": {
        "type": {
          "enum": [
147 lines total — download for the full file.

Specifications

Schema Dialect
JSON Schema 2020-12
Required Keys
3
Definitions
1
Uses Ref
true
Additional Properties False
4

Testing contract

Reference control
Scenario
Validate a Helm values file against the chart's own values.schema.json
Expected result
The defaults and the merged production values both validate, while a values file adding an unknown key under image is rejected by additionalProperties: false

What is a .json file?

JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format representing objects, arrays, strings, numbers, booleans, and null. It is language-independent, human-readable, and the dominant format for web APIs and configuration. It requires a single well-formed root value.

How to use this file

Use an example JSON file to test parsers and serializers, schema validation, Unicode and number-precision handling, and API request or response processing.

How to use this file for testing

“Helm values.schema.json” is a deterministic Novus Examples fixture for Schema validation, JSON parsing, Config testing. JSON Schema documents describing a data shape — for testing validators and schema-aware tooling.

Documented properties for this file: JSON · 3,052 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Pipeline and infrastructure fixtures are inert configuration: steps reference fictional images and scripts, and nothing here executes. Run your linter, schema validator, migrator, or policy engine against them, and expect the deprecated-syntax and intentionally invalid variants to be rejected.

Code examples

import json

with open("helm-values-schema.json") as f:
    data = json.load(f)
print(type(data), len(data))

Generated by generation/pipelines.py. Free for any use, no attribution required — license.