{"id":51242390,"url":"https://github.com/funnyhcat-dotcom/api-shape-diff","last_synced_at":"2026-06-29T01:04:01.036Z","repository":{"id":368066938,"uuid":"1283409143","full_name":"funnyhcat-dotcom/api-shape-diff","owner":"funnyhcat-dotcom","description":"Compare JSON/API response shapes and highlight breaking changes.","archived":false,"fork":false,"pushed_at":"2026-06-28T22:35:51.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-29T00:06:05.773Z","etag":null,"topics":["api","cli","developer-tools","diff","json","nodejs","schema","testing"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/funnyhcat-dotcom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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-06-28T22:35:45.000Z","updated_at":"2026-06-28T22:35:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/funnyhcat-dotcom/api-shape-diff","commit_stats":null,"previous_names":["funnyhcat-dotcom/api-shape-diff"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/funnyhcat-dotcom/api-shape-diff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyhcat-dotcom%2Fapi-shape-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyhcat-dotcom%2Fapi-shape-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyhcat-dotcom%2Fapi-shape-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyhcat-dotcom%2Fapi-shape-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funnyhcat-dotcom","download_url":"https://codeload.github.com/funnyhcat-dotcom/api-shape-diff/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyhcat-dotcom%2Fapi-shape-diff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34909148,"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-28T02:00:05.809Z","response_time":54,"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":["api","cli","developer-tools","diff","json","nodejs","schema","testing"],"created_at":"2026-06-29T01:04:00.928Z","updated_at":"2026-06-29T01:04:01.028Z","avatar_url":"https://github.com/funnyhcat-dotcom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# api-shape-diff\n\n[![CI](https://github.com/funnyhcat-dotcom/api-shape-diff/actions/workflows/ci.yml/badge.svg)](https://github.com/funnyhcat-dotcom/api-shape-diff/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nCompare two JSON/API responses and see what changed in the **shape**: removed fields, added fields, and type changes.\n\nIt is built for developers who want a tiny CLI to catch accidental API breaking changes before they ship.\n\n## Why\n\nAPI responses drift over time. A field disappears, an `id` changes from number to string, an array item loses a property, and frontends break. `api-shape-diff` gives you a fast sanity check from real JSON samples.\n\n## Try it\n\n```bash\nnpx api-shape-diff before.json after.json\n```\n\nAlias:\n\n```bash\nnpx api-shape-diff examples/v1.json examples/v2.json\n# or after install: shapediff examples/v1.json examples/v2.json\n```\n\nExample output:\n\n```text\nAPI shape diff: 8 changes (4 breaking, 4 non-breaking)\n! breaking     $.email removed $.email\n! breaking     $.id type changed from number to string\n+ non-breaking $.createdAt added $.createdAt\n```\n\n## CI usage\n\nFail a build when a new response sample has breaking changes:\n\n```bash\nnpx api-shape-diff snapshots/user-v1.json snapshots/user-v2.json --fail-on breaking\n```\n\nGenerate a pull request note:\n\n```bash\nnpx api-shape-diff before.json after.json --format markdown \u003e API_DIFF.md\n```\n\n## Options\n\n| Option | Description |\n|---|---|\n| `--format text\\|json\\|markdown` | Output format. Default: `text` |\n| `--fail-on none\\|breaking\\|any` | Exit non-zero for breaking or any change |\n| `--array-mode sample\\|all` | Infer arrays from first item or all items. Default: `all` |\n| `--max-examples \u003cn\u003e` | Keep example values in JSON output |\n\n## What counts as breaking?\n\n- Removed fields\n- Type changes, such as `number -\u003e string`\n- A field becoming required inside mixed array object samples\n\nWhat is usually non-breaking:\n\n- Added fields\n- A field becoming optional\n\n## Limitations\n\nThis is not a full JSON Schema validator. It intentionally compares shapes from real JSON samples, so it is simple and fast. For production contracts, pair it with schema tests.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnyhcat-dotcom%2Fapi-shape-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunnyhcat-dotcom%2Fapi-shape-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnyhcat-dotcom%2Fapi-shape-diff/lists"}