Generate API responses that strictly conform to the API contract. ## API Contract {{api_contract}} ## Request Context {{request_context}} ## Constraints - Max response size: {{max_size}}KB - Response time budget: {{time_budget}}ms **Generation Instructions:** 1. **Contract Parsing** - Required fields and types - Optional fields - Enum constraints - Nested structures 2. **Response Construction** - Build response object - Validate against schema - Apply size constraints - Handle nullables 3. **Constraint Enforcement** - Size verification - Type checking - Enum validation - Reference integrity 4. **Error Handling** - Invalid request response - Partial success handling - Error codes **Output:** ```json // Contract-compliant response ``` **Validation Report:** Compliance status
Constrained API Response Generator
U
@
Generate API responses with strict contract compliance, size constraints, type validation, and proper error handling.
99 copies0 forks
Details
Category
CodingUse Cases
API responsesContract complianceSchema validation
Works Best With
claude-sonnet-4-20250514gpt-4o
Created Shared