diff --git a/doc/specs/schemas/OpeningExplorerJson.yaml b/doc/specs/schemas/OpeningExplorerJson.yaml index cdcfa14..3b9023e 100644 --- a/doc/specs/schemas/OpeningExplorerJson.yaml +++ b/doc/specs/schemas/OpeningExplorerJson.yaml @@ -1,3 +1,43 @@ +type: object +properties: + opening: + type: object + properties: + eco: + type: string + name: + type: string + white: + type: number + draws: + type: number + black: + type: number + moves: + type: array + items: + $ref: './OpeningExplorerMove.yaml' + topGames: + type: array + items: + $ref: './OpeningExplorerTopGame.yaml' + recentGames: + type: array + items: + type: object + history: + type: array + items: + type: object + properties: + month: + type: string + white: + type: number + draws: + type: number + black: + type: number example: { 'opening': { 'eco': 'D10', 'name': 'Slav Defense: Exchange Variation' }, diff --git a/doc/specs/schemas/OpeningExplorerMove.yaml b/doc/specs/schemas/OpeningExplorerMove.yaml new file mode 100644 index 0000000..8b5629b --- /dev/null +++ b/doc/specs/schemas/OpeningExplorerMove.yaml @@ -0,0 +1,34 @@ +type: object +properties: + uci: + type: string + san: + type: string + averageRating: + type: number + white: + type: number + draws: + type: number + black: + type: number + game: + oneOf: + - type: 'null' + - type: object + properties: + id: + type: string + winner: + type: [string, 'null'] + enum: + - white + - black + white: + $ref: './OpeningExplorerPlayer.yaml' + black: + $ref: './OpeningExplorerPlayer.yaml' + year: + type: number + month: + type: string diff --git a/doc/specs/schemas/OpeningExplorerPlayer.yaml b/doc/specs/schemas/OpeningExplorerPlayer.yaml new file mode 100644 index 0000000..f004a86 --- /dev/null +++ b/doc/specs/schemas/OpeningExplorerPlayer.yaml @@ -0,0 +1,6 @@ +type: object +properties: + name: + type: string + rating: + type: number diff --git a/doc/specs/schemas/OpeningExplorerPlayerJson.yaml b/doc/specs/schemas/OpeningExplorerPlayerJson.yaml index a105892..381c52e 100644 --- a/doc/specs/schemas/OpeningExplorerPlayerJson.yaml +++ b/doc/specs/schemas/OpeningExplorerPlayerJson.yaml @@ -1,3 +1,28 @@ +type: object +properties: + white: + type: number + draws: + type: number + black: + type: number + moves: + type: array + items: + $ref: './OpeningExplorerPlayerMove.yaml' + recentGames: + type: array + items: + $ref: './OpeningExplorerPlayerRecentGame.yaml' + opening: + type: object + properties: + eco: + type: string + name: + type: string + queuePosition: + type: number example: { 'white': 359, diff --git a/doc/specs/schemas/OpeningExplorerPlayerMove.yaml b/doc/specs/schemas/OpeningExplorerPlayerMove.yaml new file mode 100644 index 0000000..d72cd69 --- /dev/null +++ b/doc/specs/schemas/OpeningExplorerPlayerMove.yaml @@ -0,0 +1,43 @@ +type: object +properties: + uci: + type: string + san: + type: string + averageOpponentRating: + type: number + performance: + type: number + white: + type: number + draws: + type: number + black: + type: number + game: + oneOf: + - type: 'null' + - type: object + properties: + id: + type: string + winner: + type: [string, 'null'] + enum: + - white + - black + speed: + $ref: './Speed.yaml' + mode: + type: string + enum: + - casual + - rated + white: + $ref: './OpeningExplorerPlayer.yaml' + black: + $ref: './OpeningExplorerPlayer.yaml' + year: + type: number + month: + type: string diff --git a/doc/specs/schemas/OpeningExplorerPlayerRecentGame.yaml b/doc/specs/schemas/OpeningExplorerPlayerRecentGame.yaml new file mode 100644 index 0000000..bcedff6 --- /dev/null +++ b/doc/specs/schemas/OpeningExplorerPlayerRecentGame.yaml @@ -0,0 +1,23 @@ +type: object +properties: + uci: + type: string + id: + type: string + winner: + type: [string, 'null'] + speed: + $ref: './Speed.yaml' + mode: + type: string + enum: + - casual + - rated + white: + $ref: './OpeningExplorerPlayer.yaml' + black: + $ref: './OpeningExplorerPlayer.yaml' + year: + type: number + month: + type: string diff --git a/doc/specs/schemas/OpeningExplorerTopGame.yaml b/doc/specs/schemas/OpeningExplorerTopGame.yaml new file mode 100644 index 0000000..85d89e1 --- /dev/null +++ b/doc/specs/schemas/OpeningExplorerTopGame.yaml @@ -0,0 +1,19 @@ +type: object +properties: + uci: + type: string + id: + type: string + winner: + type: [string, 'null'] + enum: + - white + - black + white: + $ref: './OpeningExplorerPlayer.yaml' + black: + $ref: './OpeningExplorerPlayer.yaml' + year: + type: number + month: + type: string