[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FCDBG141CHY6H8XBGG5AXS":3,"skill-same:01M6FCDBG141CHY6H8XBGG5AXS":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":63,"commitSha":64,"skillDirectory":65,"forksCount":66,"repositoryHtmlUrl":67,"repositoryHomepageUrl":68,"ownerHtmlUrl":69,"ownerBlogUrl":6,"ownerDescription":70,"updatedAt":71,"install":72,"resources":85},"01M6FCDBG141CHY6H8XBGG5AXS","validating-api-responses",null,"Validate API responses against schemas to ensure contract compliance and data integrity.\nUse when ensuring API response correctness.\nTrigger with phrases like \"validate responses\", \"check API responses\", or \"verify response format\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fvalidating-api-responses\u002FSKILL.md",[18,23,28],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",{"categoryNo":29,"categoryName":30,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000037","律师与法务",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"api","validating api responses","edit","validating-api","correctness","with","data integrity","trigger","io","contract","use","codex","write","read","check","format","Bash","verify","compliance","code","2026-11-10 10:12:30",false,"---\nname: validating-api-responses\ndescription: |\n  Validate API responses against schemas to ensure contract compliance and data integrity.\n  Use when ensuring API response correctness.\n  Trigger with phrases like \"validate responses\", \"check API responses\", or \"verify response format\".\n  \nallowed-tools: Read, Write, Edit, Grep, Glob, Bash(api:validate-*)\nversion: 1.0.0\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\nlicense: MIT\ncompatible-with: claude-code, codex, openclaw\ntags: [api, compliance, validating-api]\n\n---\n# Validating API Responses\n\n## Overview\n\nValidate API responses against OpenAPI schemas, JSON Schema definitions, and contract specifications to detect data integrity violations, schema drift, and backward compatibility regressions. Run validation in middleware (development\u002Fstaging) or as post-deployment contract tests to ensure every response conforms to the documented API contract.\n\n## Prerequisites\n\n- OpenAPI 3.0+ specification with complete response schema definitions for all endpoints\n- JSON Schema validator: Ajv (Node.js), jsonschema (Python), or everit-org\u002Fjson-schema (Java)\n- Response validation middleware or test harness integrated into CI pipeline\n- API test client for exercising endpoints and capturing response bodies\n- Schema diff tool for detecting contract changes between versions\n\n## Instructions\n\n1. Read the OpenAPI specification using Read and extract all response schemas per endpoint, including success responses (200, 201), error responses (400, 404, 500), and header definitions.\n2. Compile JSON Schema validators for each endpoint-status combination, enabling strict mode (`additionalProperties: false`) to detect undocumented fields leaking into responses.\n3. Implement response validation middleware that intercepts outgoing responses and validates the body against the corresponding schema, logging violations without blocking responses in production.\n4. Configure validation strictness per environment: `strict` (fail on violation) in development\u002Fstaging, `warn` (log only) in production, with violation metrics emitted for monitoring.\n5. Add header validation to verify required response headers (Content-Type, Cache-Control, rate limit headers) match the OpenAPI specification.\n6. Build a contract test suite that sends representative requests to each endpoint and validates every response field, including nested objects, arrays, enums, nullable fields, and format constraints (date-time, email, URI).\n7. Implement schema drift detection that compares the current response shape against the documented schema after each deployment, alerting when undocumented fields appear or documented fields disappear.\n8. Generate a validation coverage report showing which endpoints and response codes have schema validation, identifying gaps in the specification.\n\nSee `${CLAUDE_SKILL_DIR}\u002Freferences\u002Fimplementation.md` for the full implementation guide.\n\n## Output\n\n- `${CLAUDE_SKILL_DIR}\u002Fsrc\u002Fmiddleware\u002Fresponse-validator.js` - Response schema validation middleware\n- `${CLAUDE_SKILL_DIR}\u002Fsrc\u002Fvalidators\u002F` - Compiled JSON Schema validators per endpoint\n- `${CLAUDE_SKILL_DIR}\u002Ftests\u002Fcontract\u002F` - Contract test suite validating all endpoint responses\n- `${CLAUDE_SKILL_DIR}\u002Freports\u002Fvalidation-coverage.md` - Schema coverage report per endpoint and status code\n- `${CLAUDE_SKILL_DIR}\u002Freports\u002Fschema-drift.json` - Detected undocumented response field changes\n- `${CLAUDE_SKILL_DIR}\u002Fsrc\u002Fconfig\u002Fvalidation.js` - Per-environment validation strictness configuration\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| Additional property detected | Response contains field not defined in schema | Add field to schema if intentional; remove from serializer if data leak; configure `additionalProperties` |\n| Type mismatch | Field returns string instead of documented integer (or vice versa) | Fix serializer to match schema type; add type coercion test; check ORM field mapping |\n| Required field missing | Response omits a field marked required in schema | Verify database query includes the field; check conditional serialization logic |\n| Null value on non-nullable | Field returns null but schema does not include `nullable: true` | Update schema to allow null, or fix data source to guarantee non-null values |\n| Format validation failure | Date field does not match RFC 3339 format or email field format invalid | Apply format serialization at the ORM\u002Fmodel level before response construction |\n\nRefer to `${CLAUDE_SKILL_DIR}\u002Freferences\u002Ferrors.md` for comprehensive error patterns.\n\n## Examples\n\n**CI contract gate**: On every pull request, run contract tests that validate all endpoint responses against the OpenAPI spec, failing the build if any response violates the documented schema.\n\n**Production response sampling**: In production, validate 5% of responses against schemas (sampled randomly), emitting `response_validation_failure` metrics to detect schema drift caused by data changes.\n\n**Backward compatibility check**: Compare v1 and v2 response schemas to verify that v2 is a superset of v1 (no removed fields, no type changes), ensuring existing consumers are not broken.\n\nSee `${CLAUDE_SKILL_DIR}\u002Freferences\u002Fexamples.md` for additional examples.\n\n## Resources\n\n- JSON Schema Specification: https:\u002F\u002Fjson-schema.org\u002Fspecification\n- Ajv JSON Schema validator: https:\u002F\u002Fajv.js.org\u002F\n- OpenAPI response validation best practices\n- Consumer-Driven Contract Testing with Pact: https:\u002F\u002Fpact.io\u002F\n","# Validating API Responses\n\n## Overview\n\nValidate API responses against OpenAPI schemas, JSON Schema definitions, and contract specifications to detect data integrity violations, schema drift, and backward compatibility regressions. Run validation in middleware (development\u002Fstaging) or as post-deployment contract tests to ensure every response conforms to the documented API contract.\n\n## Prerequisites\n\n- OpenAPI 3.0+ specification with complete response schema definitions for all endpoints\n- JSON Schema validator: Ajv (Node.js), jsonschema (Python), or everit-org\u002Fjson-schema (Java)\n- Response validation middleware or test harness integrated into CI pipeline\n- API test client for exercising endpoints and capturing response bodies\n- Schema diff tool for detecting contract changes between versions\n\n## Instructions\n\n1. Read the OpenAPI specification using Read and extract all response schemas per endpoint, including success responses (200, 201), error responses (400, 404, 500), and header definitions.\n2. Compile JSON Schema validators for each endpoint-status combination, enabling strict mode (`additionalProperties: false`) to detect undocumented fields leaking into responses.\n3. Implement response validation middleware that intercepts outgoing responses and validates the body against the corresponding schema, logging violations without blocking responses in production.\n4. Configure validation strictness per environment: `strict` (fail on violation) in development\u002Fstaging, `warn` (log only) in production, with violation metrics emitted for monitoring.\n5. Add header validation to verify required response headers (Content-Type, Cache-Control, rate limit headers) match the OpenAPI specification.\n6. Build a contract test suite that sends representative requests to each endpoint and validates every response field, including nested objects, arrays, enums, nullable fields, and format constraints (date-time, email, URI).\n7. Implement schema drift detection that compares the current response shape against the documented schema after each deployment, alerting when undocumented fields appear or documented fields disappear.\n8. Generate a validation coverage report showing which endpoints and response codes have schema validation, identifying gaps in the specification.\n\nSee `${CLAUDE_SKILL_DIR}\u002Freferences\u002Fimplementation.md` for the full implementation guide.\n\n## Output\n\n- `${CLAUDE_SKILL_DIR}\u002Fsrc\u002Fmiddleware\u002Fresponse-validator.js` - Response schema validation middleware\n- `${CLAUDE_SKILL_DIR}\u002Fsrc\u002Fvalidators\u002F` - Compiled JSON Schema validators per endpoint\n- `${CLAUDE_SKILL_DIR}\u002Ftests\u002Fcontract\u002F` - Contract test suite validating all endpoint responses\n- `${CLAUDE_SKILL_DIR}\u002Freports\u002Fvalidation-coverage.md` - Schema coverage report per endpoint and status code\n- `${CLAUDE_SKILL_DIR}\u002Freports\u002Fschema-drift.json` - Detected undocumented response field changes\n- `${CLAUDE_SKILL_DIR}\u002Fsrc\u002Fconfig\u002Fvalidation.js` - Per-environment validation strictness configuration\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| Additional property detected | Response contains field not defined in schema | Add field to schema if intentional; remove from serializer if data leak; configure `additionalProperties` |\n| Type mismatch | Field returns string instead of documented integer (or vice versa) | Fix serializer to match schema type; add type coercion test; check ORM field mapping |\n| Required field missing | Response omits a field marked required in schema | Verify database query includes the field; check conditional serialization logic |\n| Null value on non-nullable | Field returns null but schema does not include `nullable: true` | Update schema to allow null, or fix data source to guarantee non-null values |\n| Format validation failure | Date field does not match RFC 3339 format or email field format invalid | Apply format serialization at the ORM\u002Fmodel level before response construction |\n\nRefer to `${CLAUDE_SKILL_DIR}\u002Freferences\u002Ferrors.md` for comprehensive error patterns.\n\n## Examples\n\n**CI contract gate**: On every pull request, run contract tests that validate all endpoint responses against the OpenAPI spec, failing the build if any response violates the documented schema.\n\n**Production response sampling**: In production, validate 5% of responses against schemas (sampled randomly), emitting `response_validation_failure` metrics to detect schema drift caused by data changes.\n\n**Backward compatibility check**: Compare v1 and v2 response schemas to verify that v2 is a superset of v1 (no removed fields, no type changes), ensuring existing consumers are not broken.\n\nSee `${CLAUDE_SKILL_DIR}\u002Freferences\u002Fexamples.md` for additional examples.\n\n## Resources\n\n- JSON Schema Specification: https:\u002F\u002Fjson-schema.org\u002Fspecification\n- Ajv JSON Schema validator: https:\u002F\u002Fajv.js.org\u002F\n- OpenAPI response validation best practices\n- Consumer-Driven Contract Testing with Pact: https:\u002F\u002Fpact.io\u002F\n",{"name":5,"tags":57,"author":58,"license":15,"version":59,"description":60,"allowed-tools":61,"compatible-with":62},[32,50,35],"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Validate API responses against schemas to ensure contract compliance and data integrity.\nUse when ensuring API response correctness.\nTrigger with phrases like \"validate responses\", \"check API responses\", or \"verify response format\".\n","Read, Write, Edit, Grep, Glob, Bash(api:validate-*)","claude-code, codex, openclaw","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fvalidating-api-responses",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill validating-api-responses",{"tool":78,"command":79},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill validating-api-responses",{"tool":81,"command":82},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill validating-api-responses","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fvalidating-api-responses\u002FSKILL.md",true,[],[87,99,109,118,124,131],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":95,"publishedAt":52},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[92],{"categoryNo":93,"categoryName":94,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[96,97,98],"model","model hierarchy","model hierarchy skill",{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":105,"publishedAt":52},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[104],{"categoryNo":93,"categoryName":94,"taxonomyType":21,"taxonomyTypeDesc":22},[106,107,108],"MCP","zoom","zoom mcp",{"skillNo":110,"name":111,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":52},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[115,116,117,107],"sdk","zoom apps sdk","apps",{"skillNo":119,"name":120,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":52},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[120],{"skillNo":125,"name":126,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":130,"publishedAt":52},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[129],{"categoryNo":93,"categoryName":94,"taxonomyType":21,"taxonomyTypeDesc":22},[126],{"skillNo":132,"name":133,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":52},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[133]]