{"openapi":"3.1.0","info":{"title":"Round Robin Standings","version":"1.0.0","description":"Build standings from completed round-robin matches using caller-defined points and goal-difference tiebreaks.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/round-robin-standings/v1/check":{"post":{"operationId":"round_robin_standings","summary":"Build standings from completed round-robin matches using caller-defined points and goal-difference tiebreaks.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teams":{"minItems":2,"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"points":{"type":"object","properties":{"win":{"type":"integer","minimum":0,"maximum":1000},"draw":{"type":"integer","minimum":0,"maximum":1000},"loss":{"type":"integer","minimum":0,"maximum":1000}},"required":["win","draw","loss"],"additionalProperties":false},"matches":{"maxItems":496,"type":"array","items":{"type":"object","properties":{"home":{"type":"string","minLength":1,"maxLength":80},"away":{"type":"string","minLength":1,"maxLength":80},"home_score":{"type":"integer","minimum":0,"maximum":1000},"away_score":{"type":"integer","minimum":0,"maximum":1000}},"required":["home","away","home_score","away_score"],"additionalProperties":false}}},"required":["teams","points","matches"],"additionalProperties":false},"example":{"teams":["A","B","C"],"points":{"win":3,"draw":1,"loss":0},"matches":[{"home":"A","away":"B","home_score":2,"away_score":1},{"home":"C","away":"B","home_score":0,"away_score":0}]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"standings":[{"rank":1,"team":"A","played":1,"points":3,"goals_for":2,"goal_difference":1},{"rank":2,"team":"C","played":1,"points":1,"goals_for":0,"goal_difference":0},{"rank":3,"team":"B","played":2,"points":1,"goals_for":1,"goal_difference":-1}],"remaining_matches":1}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}