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

    NowChess released this 2026-04-12 17:15:11 +02:00 | 126 commits to main since this release

    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

    Co-authored-by: LQ63 lkhermann@web.de
    Reviewed-on: #25
    Reviewed-by: Janis janis-e@gmx.de
    Co-authored-by: Leon Hermann lq@blackhole.local
    Co-committed-by: Leon Hermann lq@blackhole.local

    Downloads