Skip to content

Commit

Permalink
Flair schema + add for teams (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev authored Jul 10, 2024
1 parent 20d10d8 commit b64c3ad
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 10 deletions.
3 changes: 3 additions & 0 deletions doc/specs/schemas/Flair.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type: string

description: See [available flair list and images](https://github.com/lichess-org/lila/tree/master/public/flair)
2 changes: 1 addition & 1 deletion doc/specs/schemas/PuzzleAndGame.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ properties:
color:
type: string
flair:
type: string
$ref: './Flair.yaml'
id:
type: string
name:
Expand Down
48 changes: 41 additions & 7 deletions doc/specs/schemas/Team.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,55 @@
type: object

properties:
id:
type: string
example: coders
name:
type: string
example: Coders
description:
type: string
example: "There are 10 kinds of people in the world: those who understand binary, and the others.\r\n\r\nIf you want to join the team, prove (briefly) that you can code in the request message!"
open:
type: boolean
example: false
leader:
$ref: './LightUser.yaml'
flair:
$ref: './Flair.yaml'
leaders:
type: array
items:
$ref: './LightUser.yaml'
nbMembers:
type: integer
example: 3129
open:
type: boolean
joined:
type: boolean
requested:
type: boolean

required:
- id
- name

example:
{
"id": "lichess-swiss",
"name": "Lichess Swiss",
"description": "The official Lichess Swiss team. We organize regular swiss tournaments for all to join.",
"flair": "food-drink.cheese-wedge",
"leader": {
"flair": "activity.lichess",
"id": "lichess",
"name": "Lichess",
"patron": true
},
"leaders": [
{
"flair": "activity.lichess",
"id": "lichess",
"name": "Lichess",
"patron": true
}
],
"nbMembers": 487629,
"open": true,
"joined": false,
"requested": false
}
3 changes: 1 addition & 2 deletions doc/specs/schemas/User.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ properties:
perfs:
$ref: './Perfs.yaml'
flair:
type: string
example: nature.water-wave
$ref: './Flair.yaml'
createdAt:
type: integer
format: int64
Expand Down

0 comments on commit b64c3ad

Please sign in to comment.