{"id":41271329,"url":"https://github.com/opsmill/infrahub-jsonschema","last_synced_at":"2026-01-23T02:24:58.697Z","repository":{"id":256733921,"uuid":"648128580","full_name":"opsmill/infrahub-jsonschema","owner":"opsmill","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-12T16:42:28.000Z","size":96,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-12-25T19:02:31.757Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opsmill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-01T09:15:39.000Z","updated_at":"2025-12-12T16:42:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d1c519e-3489-4cb7-9fa8-cf2bcd4d49e8","html_url":"https://github.com/opsmill/infrahub-jsonschema","commit_stats":null,"previous_names":["opsmill/infrahub-jsonschema"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opsmill/infrahub-jsonschema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsmill%2Finfrahub-jsonschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsmill%2Finfrahub-jsonschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsmill%2Finfrahub-jsonschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsmill%2Finfrahub-jsonschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opsmill","download_url":"https://codeload.github.com/opsmill/infrahub-jsonschema/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsmill%2Finfrahub-jsonschema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28678241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"online","status_checked_at":"2026-01-23T02:00:08.296Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-01-23T02:24:57.107Z","updated_at":"2026-01-23T02:24:58.687Z","avatar_url":"https://github.com/opsmill.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# infrahub-jsonschema\n\nInfrahub JSON Schema is the home of various [JSON Schema](https://json-schema.org/) files related to [Infrahub](https://github.com/opsmill/infrahub)\n\n\u003e A JSON Schema file is a standard specification that describes the structure and validation rules for various data (YAML, JSON). It provides a way to define what a valid document should look like, including the types of values, required fields, default values, and other constraints.\n\nCurrently we maintain JSON Schema files for:\n\n- [Infrahub Schema definition file](https://docs.infrahub.app/topics/schema) Schema file for Infrahub, usually defined in Yaml\n- [Infrahub Menu Schema](https://docs.infrahub.app/reference/menu/) Schema for defining menu structures in Infrahub im Yaml.\n- [Infrahub repository configuration file](https://docs.infrahub.app/topics/infrahub-yml) (`.infrahub.yml`)\n\n## Integration with standard IDE via yaml-language-server\n\nIn most IDE it's be possible to get inline format validation of a YAML file by providing the address of a JSON Schema file at the top of the file, using the syntax below\n\n#### For schema definitions, use:\n\n```yaml\n# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json\n---\nversion: '1.0'\n```\n\n#### For menu definitions, use:\n\n```yaml\n# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/menu/latest.json\n---\napiVersion: infrahub.app/v1\nkind: Menu\n```\n\n## Public URL\n\nEverything under the `schemas/` directory is automatically published to `https://schema.infrahub.app` to simplify the integration with external tools that requires a public URL\n\n## Validation\n\nThis repository includes automated validation to ensure all JSON files are valid JSON schemas and any `.infrahub.yml` files conform to the repository configuration schema.\n\n### Running Validation Locally\n\nTo validate all schema files locally:\n\n```shell\nuv run pytest test_schema_validation.py -v\n```\n\nThis will:\n- Validate that all `.json` files contain valid JSON and are valid JSON schemas\n- Validate that any `.infrahub.yml` files are valid YAML and conform to the repository config schema\n- Report any validation errors with detailed error messages\n\n### Continuous Integration\n\nThe validation runs automatically on every push and pull request via GitHub Actions. The CI workflow:\n- Validates all JSON schema files using pytest\n- Double-checks JSON syntax using `jq`\n- Fails the build if any validation errors are found\n\n## How to update a Schema\n\nGenerate the new schemas, using the invoke tool from the main [Infrahub repository](https://github.com/opsmill/infrahub).\n\n```shell\ninvoke schema.generate-jsonschema\n```\n\nThe command will create files under ./generated that needs to be copied to the corresponding location within this repository. The latest develop.json files can be copied as is and for released versions you would name them as [release-number].json and update the symlink to latest.json for the given schema.\n\nExample:\n\n- Copy the schema file to schemas/infrahub/schema/[version-number].json (i.e. 0.12.0.json)\n- Navigate to the `schemas/infrahub/schema` and update the symbolic link\n\n```shell\ncd schemas/infrahub/schema\nln -f -s 0.12.0.json latest.json\n```\n\nAfter updating schemas, run the validation to ensure they are correct:\n\n```shell\nuv run pytest test_schema_validation.py -v\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopsmill%2Finfrahub-jsonschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopsmill%2Finfrahub-jsonschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopsmill%2Finfrahub-jsonschema/lists"}