{"id":15012974,"url":"https://github.com/socialgouv/helm-schema","last_synced_at":"2025-07-12T02:41:09.392Z","repository":{"id":186056188,"uuid":"674552490","full_name":"SocialGouv/helm-schema","owner":"SocialGouv","description":"JSON Schema generator for your HELM charts","archived":false,"fork":false,"pushed_at":"2025-04-11T20:05:32.000Z","size":583,"stargazers_count":22,"open_issues_count":16,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T21:23:04.889Z","etag":null,"topics":["documentation","helm","jsonschema","kubernetes"],"latest_commit_sha":null,"homepage":"https://socialgouv.github.io/helm-schema/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SocialGouv.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-04T08:12:46.000Z","updated_at":"2025-03-08T09:19:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"a149077a-71cb-4bd9-88bc-d63696135946","html_url":"https://github.com/SocialGouv/helm-schema","commit_stats":{"total_commits":56,"total_committers":3,"mean_commits":"18.666666666666668","dds":0.2678571428571429,"last_synced_commit":"573612e3486c0437c95dfb6141482aa52a65e63d"},"previous_names":["socialgouv/helm-schema"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocialGouv%2Fhelm-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocialGouv%2Fhelm-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocialGouv%2Fhelm-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocialGouv%2Fhelm-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SocialGouv","download_url":"https://codeload.github.com/SocialGouv/helm-schema/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248512531,"owners_count":21116618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","helm","jsonschema","kubernetes"],"created_at":"2024-09-24T19:43:32.866Z","updated_at":"2025-04-12T03:31:05.725Z","avatar_url":"https://github.com/SocialGouv.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @socialgouv/helm-schema ![npm (scoped)](https://img.shields.io/npm/v/%40socialgouv/helm-schema)\n\n[JSON Schema](https://json-schema.org) generator for your [HELM charts](https://helm.sh).\n\nDemo : https://socialgouv.github.io/helm-schema\n\n## Usage\n\nExample `values.yaml`, following [JSDoc standards](https://devhints.io/jsdoc)\n\n```yaml\n# @param {object} smtp Your SMTP setup\nsmtp:\n  # @param {string} host SMTP hostname\n  host:\n  # @param {number} [port] SMTP port\n  port: 587\n\n# Setup your securityContext to reduce security risks, see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\n# @param {https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.24.0/_definitions.json#/definitions/io.k8s.api.core.v1.PodSecurityContext} [securityContext]\nsecurityContext:\n```\n\nTo generate a JSON schema from your `values.yaml` :\n\n```sh\nnpx @socialgouv/helm-schema -f values.yaml\n```\n\nOr via TS :\n\n```js\nimport { toJsonSchema } from \"@socialgouv/helm-schema\";\n\nimport yaml from \"./values.yaml\";\n\nconst schema = toJsonSchema(yaml);\n```\n\nYou get such JSON schema in result :\n\n```json\n{\n  \"type\": \"object\",\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n  \"required\": [\"smtp\"],\n  \"properties\": {\n    \"smtp\": {\n      \"type\": \"object\",\n      \"title\": \"Your SMTP setup\",\n      \"required\": [\"host\"],\n      \"properties\": {\n        \"host\": {\n          \"type\": \"string\",\n          \"title\": \"SMTP hostname\"\n        },\n        \"port\": {\n          \"type\": \"number\",\n          \"title\": \"SMTP port\",\n          \"default\": \"587\"\n        }\n      }\n    },\n    \"securityContext\": {\n      \"$ref\": \"https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.24.0/_definitions.json#/definitions/io.k8s.api.core.v1.PodSecurityContext\",\n      \"description\": \"Setup your securityContext to reduce security risks, see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\"\n    }\n  }\n}\n```\n\nThis schema can then be used with your favorite editor for HELM values validation.\n\n⚠️ Be sure to add an `$id` to the schema if its meant to be referenced from other schemas\n\n## Dev\n\nupdate snapshots : `yarn snapshots`\n\n## Todo\n\n- ~~multiline comments~~\n- sections\n- infer types from default values\n- ~~handle arrays~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocialgouv%2Fhelm-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocialgouv%2Fhelm-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocialgouv%2Fhelm-schema/lists"}