{"openapi":"3.0.3","info":{"title":"AppSec Lab API","version":"2.4.0","description":"Curated OpenAPI 3.0.3 schema for Cloudflare API Shield Schema validation. Hand-written (not auto-generated) to stay inside the supported feature set."},"servers":[{"url":"https://api-lab.santosedge.com"}],"paths":{"/api/health":{"get":{"operationId":"getHealth","summary":"Liveness check","responses":{"200":{"description":"OK"}}}},"/api/version":{"get":{"operationId":"getVersion","summary":"Build and schema version","responses":{"200":{"description":"OK"}}}},"/api/customers":{"get":{"operationId":"listCustomers","summary":"List customers (query parameter validation)","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0,"maximum":10000}},{"name":"tier","in":"query","required":false,"schema":{"type":"string","enum":["standard","premium"]}}],"responses":{"200":{"description":"OK"}}},"post":{"operationId":"createCustomer","summary":"Create customer (body and header validation)","parameters":[{"name":"X-Request-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"responses":{"201":{"description":"Created"}}}},"/api/customers/{cid}":{"get":{"operationId":"getCustomer","summary":"Fetch one customer (path parameter validation)","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000000}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/api/login":{"post":{"operationId":"login","summary":"Issue a demo JWT","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}}},"responses":{"200":{"description":"OK"}}}},"/api/orders":{"get":{"operationId":"listOrders","summary":"Protected route (requires bearer token)","responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"}}}},"/echo":{"post":{"operationId":"echoPost","summary":"Diagnostics: shows what reached the origin","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK"}}}},"/api/whoami":{"get":{"operationId":"whoami","summary":"Shows which session carriers (Bearer, cookie, X-Session-Id) reached the origin","parameters":[{"name":"X-Session-Id","in":"header","required":false,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}},{"name":"lab_session","in":"cookie","required":false,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"responses":{"200":{"description":"OK"}}}},"/api/token-lab/{kind}":{"get":{"operationId":"tokenLab","summary":"Mint a valid or deliberately broken JWT for the Token Lab","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["valid","expired","not_yet_valid","tampered","wrong_key","unknown_kid","alg_none","wrong_issuer","no_exp"]}}],"responses":{"200":{"description":"OK"}}}},"/.well-known/jwks.json":{"get":{"operationId":"getJwks","summary":"Public ES256 key set","responses":{"200":{"description":"OK"}}}},"/api/cart":{"get":{"operationId":"getCart","summary":"Current session cart","responses":{"200":{"description":"OK"}}}},"/api/cart/items":{"post":{"operationId":"addCartItem","summary":"Step 1 of the checkout sequence: add an item","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartItem"}}}},"responses":{"201":{"description":"OK"},"409":{"description":"Sequence violation"}}}},"/api/checkout/quote":{"post":{"operationId":"checkoutQuote","summary":"Step 2: price the cart (requires items)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"200":{"description":"OK"},"409":{"description":"Sequence violation"}}}},"/api/checkout/confirm":{"post":{"operationId":"checkoutConfirm","summary":"Step 3: confirm (requires a prior quote)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmRequest"}}}},"responses":{"200":{"description":"OK"},"409":{"description":"Sequence violation"}}}}},"components":{"schemas":{"Customer":{"type":"object","additionalProperties":false,"required":["name","email","credit_limit"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"email":{"type":"string","format":"email","minLength":3,"maxLength":120},"tier":{"type":"string","enum":["standard","premium"]},"credit_limit":{"type":"number","minimum":0,"maximum":100000}}},"LoginRequest":{"type":"object","additionalProperties":false,"required":["username","password"],"properties":{"username":{"type":"string","minLength":1,"maxLength":64},"password":{"type":"string","minLength":1,"maxLength":128}}},"CartItem":{"type":"object","additionalProperties":false,"required":["sku","qty"],"properties":{"sku":{"type":"string","enum":["WAF-LICENSE","BOT-ADDON","API-SHIELD-SEAT"]},"qty":{"type":"integer","format":"int32","minimum":1,"maximum":10}}},"QuoteRequest":{"type":"object","additionalProperties":false,"properties":{"shipping":{"type":"string","enum":["standard","express"]}}},"ConfirmRequest":{"type":"object","additionalProperties":false,"required":["quote_id"],"properties":{"quote_id":{"type":"string","format":"uuid"}}}}}}