Skip to content

Commit

Permalink
Merge pull request #399 from AllieJonsson/opening-explorer-models
Browse files Browse the repository at this point in the history
Opening explorer models
  • Loading branch information
ornicar authored Dec 1, 2024
2 parents fa84286 + e73aa0f commit a84a374
Show file tree
Hide file tree
Showing 7 changed files with 190 additions and 0 deletions.
40 changes: 40 additions & 0 deletions doc/specs/schemas/OpeningExplorerJson.yaml
Original file line number Diff line number Diff line change
@@ -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' },
Expand Down
34 changes: 34 additions & 0 deletions doc/specs/schemas/OpeningExplorerMove.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions doc/specs/schemas/OpeningExplorerPlayer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: object
properties:
name:
type: string
rating:
type: number
25 changes: 25 additions & 0 deletions doc/specs/schemas/OpeningExplorerPlayerJson.yaml
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
43 changes: 43 additions & 0 deletions doc/specs/schemas/OpeningExplorerPlayerMove.yaml
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions doc/specs/schemas/OpeningExplorerPlayerRecentGame.yaml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions doc/specs/schemas/OpeningExplorerTopGame.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a84a374

Please sign in to comment.