Since the task to implement API I went the easiest way to implement API with least amount of efforts as possible and still to maintain cohesive project structure and code architecture. In addition to standard features the API also keeps track if there is any winner after game state update.
You build and run docker image with ready to use server
$ docker build -t ttt .
$ docker run -p 8000:8000 ttt
There are 2 options
- Use Swagger UI
http://0.0.0.0:8000/api/schema
, - Use Redoc UI
http://0.0.0.0:8000/api/redoc