docs: NCS-36 Added an API spec for Now Chess #25

Merged
Janis merged 2 commits from feat/NCS-36 into main 2026-04-12 17:15:12 +02:00
Owner

Summary

  • Adds docs/api-spec.yaml — a full OpenAPI 3.0.3 specification for the NowChess REST API
  • Endpoint paths follow the lichess board/bot split convention (/api/board/game/...)
    to leave room for a future bot API under /api/bot/game/...
  • Covers game lifecycle, move-making, draw handling, undo/redo,
    legal move introspection, and FEN/PGN import/export

Endpoints

  • Game: POST /api/board/game, GET /{gameId}, GET /{gameId}/stream, POST /{gameId}/resign
  • Move: POST /{gameId}/move/{uci}, GET /{gameId}/moves, POST /{gameId}/undo, POST /{gameId}/redo
  • Draw: POST /{gameId}/draw/{action}
  • Import: POST /import/fen, POST /import/pgn
  • Export: GET /{gameId}/export/fen, GET /{gameId}/export/pgn

Test plan

  • Open docs/api-spec.yaml in Swagger Editor (https://editor.swagger.io) — zero validation errors expected
  • Verify every endpoint maps to an existing GameEngine or RuleSet method
## Summary - Adds `docs/api-spec.yaml` — a full OpenAPI 3.0.3 specification for the NowChess REST API - Endpoint paths follow the lichess `board/bot` split convention (`/api/board/game/...`) to leave room for a future bot API under `/api/bot/game/...` - Covers game lifecycle, move-making, draw handling, undo/redo, legal move introspection, and FEN/PGN import/export ## Endpoints - Game: POST /api/board/game, GET /{gameId}, GET /{gameId}/stream, POST /{gameId}/resign - Move: POST /{gameId}/move/{uci}, GET /{gameId}/moves, POST /{gameId}/undo, POST /{gameId}/redo - Draw: POST /{gameId}/draw/{action} - Import: POST /import/fen, POST /import/pgn - Export: GET /{gameId}/export/fen, GET /{gameId}/export/pgn ## Test plan - [ ] Open docs/api-spec.yaml in Swagger Editor (https://editor.swagger.io) — zero validation errors expected - [ ] Verify every endpoint maps to an existing GameEngine or RuleSet method
lq64 added 2 commits 2026-04-12 16:42:00 +02:00
docs(core): NowChess API Spec
Build & Test (NowChessSystems) TeamCity build finished
4484ffa995
Added an API Spec to the docs folder
docs(core): NowChess API Spec
Build & Test (NowChessSystems) TeamCity build finished
2615152067
Changed format of endpoints for easier bot implementation later on
Janis requested review from Janis 2026-04-12 16:44:26 +02:00
Janis approved these changes 2026-04-12 17:14:50 +02:00
Janis merged commit 9ad11fb97a into main 2026-04-12 17:15:12 +02:00
Janis deleted branch feat/NCS-36 2026-04-12 17:15:12 +02:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NowChess/NowChessSystems#25