{"id":50666275,"url":"https://github.com/ghga-de/ghga-jsonsubschema","last_synced_at":"2026-06-08T06:36:04.559Z","repository":{"id":358687971,"uuid":"1236577894","full_name":"ghga-de/ghga-jsonsubschema","owner":"ghga-de","description":"GHGA fork of the IBM/jsonsubschema repository","archived":false,"fork":false,"pushed_at":"2026-05-18T16:16:56.000Z","size":155,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-18T17:14:19.903Z","etag":null,"topics":["json-schema","library","python","validation"],"latest_commit_sha":null,"homepage":"","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/ghga-de.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":"2026-05-12T11:30:48.000Z","updated_at":"2026-05-18T16:15:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ghga-de/ghga-jsonsubschema","commit_stats":null,"previous_names":["ghga-de/ghga-jsonsubschema"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ghga-de/ghga-jsonsubschema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghga-de%2Fghga-jsonsubschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghga-de%2Fghga-jsonsubschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghga-de%2Fghga-jsonsubschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghga-de%2Fghga-jsonsubschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghga-de","download_url":"https://codeload.github.com/ghga-de/ghga-jsonsubschema/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghga-de%2Fghga-jsonsubschema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34051771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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":["json-schema","library","python","validation"],"created_at":"2026-06-08T06:34:33.361Z","updated_at":"2026-06-08T06:36:04.554Z","avatar_url":"https://github.com/ghga-de.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GHGA JSON Subschema\n\n\u003e **Note:** This is a fork of [IBM/jsonsubschema](https://github.com/ibm/jsonsubschema) maintained by the [German Human Genome-Phenome Archive (GHGA)](https://www.ghga.de/). It was created to bring in necessary fixes, updates, and functionality required by GHGA-related projects.\n\n**ghga-jsonsubschema** checks if one JSON schema is a subschema (subtype) of another.\n\nFor any two JSON schemas s1 and s2, s1 \u003c: s2 (reads s1 is subschema/subtype of s2) if every JSON document instance that validates against s1 also validates against s2.\n\njsonsubschema is very useful in analysing schema evolution and ensuring that newer schema versions are backward compatible.\njsonsubschema also enables static type checking on different components of a system that uses JSON schema to describe data interfaces among the system's different components.\n\nFor a practical overview of the architecture, purpose, and usage of this library, please see [DETAILS.md](DETAILS.md). For the formal foundations and deep technical details, please refer to the [ISSTA 2021 paper](https://dl.acm.org/doi/10.1145/3460319.3464796) by Andrew Habib, Avraham Shinnar, Martin Hirzel, and Michael Pradel, the original authors of this library.\n\n## Installation\n\n### Requirements\n\n* Python 3.13+\n\n### Install from PyPI\n\n```sh\npip install ghga-jsonsubschema\n```\n\n### Install from source\n\n```sh\ngit clone https://github.com/ghga-de/ghga-jsonsubschema.git\ncd ghga-jsonsubschema\nuv sync\n```\n\n## Running subschema\n\nJSON subschema provides two usage interfaces:\n\n### CLI interface\n\nFirst, create two JSON schema examples by executing the following:\n\n```sh\necho '{\"type\": [\"null\", \"string\"]}' \u003e s1.json\necho '{\"type\": [\"string\", \"null\"], \"not\": {\"enum\": [\"\"]}}' \u003e s2.json\n```\n\nThen, invoke the CLI by executing:\n\n```sh\npython -m jsonsubschema s2.json s1.json\n```\n\n### Python API\n\n```python\nfrom jsonsubschema import is_subschema\n\ndef main():\n    s1 = {'type': \"integer\"}\n    s2 = {'type': [\"integer\", \"string\"]}\n\n    print(f'LHS \u003c: RHS {is_subschema(s1, s2)}')\n\nif __name__ == \"__main__\":\n    main()\n```\n\n## Development\n\nSet up a local development environment:\n\n```sh\nuv sync --extra dev\nuv run pre-commit install\n```\n\nRun the test suite:\n\n```sh\nuv run pytest tests/\n```\n\nRun the test suite with coverage:\n\n```sh\nuv run pytest --cov tests/\n```\n\n## Changes made by GHGA\n\nThis fork is based on the latest unreleased main branch of [IBM/jsonsubschema](https://github.com/ibm/jsonsubschema) and introduces additional changes:\n\n* Public API names have been changed to align with PEP 8.\n* The minimum required Python version is now 3.13.\n* Packaging uses more modern conventions.\n* Tests have been converted from `unittest` to `pytest`.\n* An empty `enum` is now treated as an uninhabited schema.\n\n## License\n\nThis repository is distributed under the terms of the Apache 2.0 License, see [LICENSE.txt](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghga-de%2Fghga-jsonsubschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghga-de%2Fghga-jsonsubschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghga-de%2Fghga-jsonsubschema/lists"}