Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background: Swiss tournaments can have custom positions, i.e games start from a FEN.
Problem: In the API, there is no
"position"field in the "create swiss" and "get swiss" operations.Suggestion: Include
"position"field when a custom position exists.Reproducers:
Create (needs existing team id, here 'yulias')
create response
{ "id": "2wexQyFc", "createdBy": "yulia", "startsAt": "2024-08-18T08:57:41.030552736Z", "name": "Gunina", "clock": { "limit": 180, "increment": 2 }, "variant": "standard", "round": 0, "nbRounds": 3, "nbPlayers": 0, "nbOngoing": 0, "status": "created", "nextRound": { "at": "2024-08-18T08:57:41.03049833Z", "in": 600 }, "verdicts": { "list": [], "accepted": true }, "stats": null, "rated": false }Get (needs existing swiss id, here '2wexQyFc')
get response
{ "id": "2wexQyFc", "createdBy": "yulia", "startsAt": "2024-08-18T08:57:41.03Z", "name": "Gunina", "clock": { "limit": 180, "increment": 2 }, "variant": "standard", "round": 0, "nbRounds": 3, "nbPlayers": 0, "nbOngoing": 0, "status": "created", "nextRound": { "at": "2024-08-18T08:57:41.03Z", "in": 567 }, "verdicts": { "list": [], "accepted": true }, "stats": null, "rated": false }With the commit included:
create response - known/named FEN
{ "id": "UvF9ICqp", "createdBy": "yulia", "startsAt": "2024-08-18T08:59:57.075598264Z", "name": "Palme", "clock": { "limit": 180, "increment": 2 }, "variant": "standard", "round": 0, "nbRounds": 3, "nbPlayers": 0, "nbOngoing": 0, "status": "created", "nextRound": { "at": "2024-08-18T08:59:57.075545288Z", "in": 600 }, "position": { "eco": "C00", "name": "French Defense", "fen": "rnbqkbnr/pppp1ppp/4p3/8/4P3/8/PPPP1PPP/RNBQKBNR w KQkq -", "url": "https://lichess.org/opening/French_Defense" }, "verdicts": { "list": [], "accepted": true }, "stats": null, "rated": false }create response - no pawns FEN
{ "id": "Zra2y6CI", "createdBy": "yulia", "startsAt": "2024-08-18T09:01:49.545046494Z", "name": "Szabó", "clock": { "limit": 180, "increment": 2 }, "variant": "standard", "round": 0, "nbRounds": 3, "nbPlayers": 0, "nbOngoing": 0, "status": "created", "nextRound": { "at": "2024-08-18T09:01:49.545033073Z", "in": 600 }, "position": { "name": "Custom position", "fen": "rnbqkbnr/8/8/8/8/8/8/RNBQKBNR w KQkq -" }, "verdicts": { "list": [], "accepted": true }, "stats": null, "rated": false }