openapi: 3.0.3 info: title: AI Code Gauntlet API version: 0.1.0 description: Sample API used as the human-approved contract layer for agent-driven implementation. servers: - url: http://localhost:3000 paths: /health: get: operationId: getHealth summary: Health check responses: "200": description: Service is healthy content: application/json: schema: $ref: "#/components/schemas/Health" /api/todos: get: operationId: listTodos summary: List todos responses: "200": description: Todo collection content: application/json: schema: $ref: "#/components/schemas/TodoList" post: operationId: createTodo summary: Create a todo requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateTodoRequest" responses: "201": description: Todo created content: application/json: schema: $ref: "#/components/schemas/Todo" "400": description: Validation error content: application/json: schema: $ref: "#/components/schemas/Error" /api/todos/{id}/complete: post: operationId: completeTodo summary: Mark a todo complete parameters: - name: id in: path required: true schema: type: string format: uuid responses: "200": description: Todo completed content: application/json: schema: $ref: "#/components/schemas/Todo" "404": description: Todo not found content: application/json: schema: $ref: "#/components/schemas/Error" components: schemas: Health: type: object required: [status, service, timestamp] additionalProperties: false properties: status: type: string enum: [ok] service: type: string timestamp: type: string format: date-time Todo: type: object required: [id, title, completed, createdAt] additionalProperties: false properties: id: type: string title: type: string minLength: 1 maxLength: 120 completed: type: boolean createdAt: type: string format: date-time TodoList: type: object required: [items] additionalProperties: false properties: items: type: array items: $ref: "#/components/schemas/Todo" CreateTodoRequest: type: object required: [title] additionalProperties: false properties: title: type: string Error: type: object required: [error] additionalProperties: false properties: error: type: string