-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathopen-api-docs.json
1 lines (1 loc) · 1.81 KB
/
open-api-docs.json
1
{"openapi":"3.0.1","info":{"title":"Tennis Kata","description":"Tennis game kata implementation","contact":{"name":"Houari ZEGAI","url":"https://zegai.netlify.app","email":"[email protected]"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"version":"v0.0.1"},"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"paths":{"/api/v1/tennis/record":{"put":{"tags":["tennis-kata-controller"],"operationId":"recordWin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordWinDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GameScoreDto"}}}}}}},"/api/v1/tennis/init":{"post":{"tags":["tennis-kata-controller"],"operationId":"initGame","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitGameDto"}}},"required":true},"responses":{"201":{"description":"Created"}}}},"/api/v1/tennis/score":{"get":{"tags":["tennis-kata-controller"],"operationId":"getScore","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GameScoreDto"}}}}}}}},"components":{"schemas":{"RecordWinDto":{"type":"object","properties":{"firstPlayerWin":{"minimum":0,"type":"integer","format":"int32"},"secondPlayerWin":{"minimum":0,"type":"integer","format":"int32"}}},"GameScoreDto":{"type":"object","properties":{"firstPlayer":{"$ref":"#/components/schemas/Player"},"secondPlayer":{"$ref":"#/components/schemas/Player"},"score":{"type":"string"}}},"Player":{"type":"object","properties":{"name":{"type":"string"},"score":{"type":"integer","format":"int32"}}},"InitGameDto":{"required":["firstPlayerName","secondPlayerName"],"type":"object","properties":{"firstPlayerName":{"type":"string"},"secondPlayerName":{"type":"string"}}}}}}