{"openapi":"3.0.3","info":{"title":"OpenAPI & JSON Schema Diff API","version":"1.0.0","description":"Detects breaking and non-breaking changes between two OpenAPI 3.x specs or JSON Schemas (removed endpoints, type changes, new required fields, enum removals, tightened bounds)."},"servers":[{"url":"https://api.tinplate.dev","description":"Production Edge Gateway"}],"components":{"schemas":{"SchemaDiffResponse":{"type":"object","properties":{"compatible":{"type":"boolean","example":false},"detected_mode":{"type":"string","enum":["json_schema","openapi"],"example":"json_schema"},"breaking_count":{"type":"integer","minimum":0,"example":3},"non_breaking_count":{"type":"integer","minimum":0,"example":1},"changes":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["breaking","non_breaking","info"]},"message":{"type":"string"},"before":{"nullable":true},"after":{"nullable":true}},"required":["path","kind","severity","message"]}}},"required":["compatible","detected_mode","breaking_count","non_breaking_count","changes"]},"SchemaDiffRequest":{"type":"object","properties":{"before":{"type":"object","additionalProperties":{"nullable":true},"example":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"age":{"type":"integer","minimum":0}}},"description":"Previous JSON Schema or OpenAPI 3.x document."},"after":{"type":"object","additionalProperties":{"nullable":true},"example":{"type":"object","required":["id","email"],"properties":{"id":{"type":"integer"},"email":{"type":"string"}}},"description":"New JSON Schema or OpenAPI 3.x document."},"mode":{"type":"string","enum":["auto","json_schema","openapi"],"example":"auto","description":"Comparison mode (auto detects OpenAPI when 'paths' and 'openapi' are present)."}},"required":["before","after"]},"ResponseMeta":{"type":"object","required":["request_id"],"properties":{"request_id":{"type":"string","format":"uuid"},"ms":{"type":"integer","minimum":0},"version":{"type":"string","example":"1.0.0"}}},"ErrorEnvelope":{"type":"object","required":["ok","error","meta"],"properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_input"},"message":{"type":"string","example":"Request body failed validation"}}},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}}},"parameters":{}},"paths":{"/v1/schema-diff":{"post":{"tags":["11_SCHEMA_DIFF"],"summary":"Compare two JSON Schemas or OpenAPI 3.x documents for breaking changes","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaDiffRequest"}}}},"responses":{"200":{"description":"Schema diff report","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/SchemaDiffResponse"},"meta":{"$ref":"#/components/schemas/ResponseMeta"}},"required":["ok","data","meta"]}}}},"400":{"description":"Invalid input or malformed JSON request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid authentication credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Request payload exceeds subscribed plan byte cap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}