From e10589b71146c2c5c641247a4cb453980c3c8046 Mon Sep 17 00:00:00 2001 From: jalpp <92553013+jalpp@users.noreply.github.com> Date: Fri, 12 Apr 2024 11:24:14 -0400 Subject: [PATCH] add optional fields in properties --- doc/specs/examples/user-georges-bot.json | 2 ++ doc/specs/schemas/Perf.yaml | 1 + doc/specs/schemas/Profile.yaml | 11 +++++++++++ doc/specs/schemas/User.yaml | 2 ++ doc/specs/schemas/UserExtended.yaml | 1 + doc/specs/tags/users/api-user-username.yaml | 2 ++ 6 files changed, 19 insertions(+) diff --git a/doc/specs/examples/user-georges-bot.json b/doc/specs/examples/user-georges-bot.json index f504271..ce13266 100644 --- a/doc/specs/examples/user-georges-bot.json +++ b/doc/specs/examples/user-georges-bot.json @@ -111,6 +111,8 @@ "fideRating": 1500, "uscfRating": 1500, "ecfRating": 1500, + "cfcRating": 1500, + "dsbRating": 1500, "links": "github.com/ornicar\r\ntwitter.com/ornicar" }, "seenAt": 1522636452014, diff --git a/doc/specs/schemas/Perf.yaml b/doc/specs/schemas/Perf.yaml index ed9fadb..d97d487 100644 --- a/doc/specs/schemas/Perf.yaml +++ b/doc/specs/schemas/Perf.yaml @@ -14,3 +14,4 @@ properties: example: -22 prov: type: boolean + description: only appears if a user's perf rating are [provisional](https://lichess.org/faq#provisional) diff --git a/doc/specs/schemas/Profile.yaml b/doc/specs/schemas/Profile.yaml index 55acc79..6bf24f1 100644 --- a/doc/specs/schemas/Profile.yaml +++ b/doc/specs/schemas/Profile.yaml @@ -17,12 +17,23 @@ properties: fideRating: type: integer example: 1500 + description: only appears if a user has set them uscfRating: type: integer example: 1500 + description: only appears if a user has set them ecfRating: type: integer example: 1500 + description: only appears if a user has set them + cfcRating: + type: integer + example: 1500 + description: only appears if a user has set them + dsbRating: + type: integer + example: 1500 + description: only appears if a user has set them links: type: string example: "github.com/ornicar\r\ntwitter.com/ornicar" diff --git a/doc/specs/schemas/User.yaml b/doc/specs/schemas/User.yaml index 737c399..af5c91c 100644 --- a/doc/specs/schemas/User.yaml +++ b/doc/specs/schemas/User.yaml @@ -18,9 +18,11 @@ properties: disabled: type: boolean example: false + description: only appears if a user's account is closed tosViolation: type: boolean example: false + description: only appears if a user's account is closed via violation of [Lichess TOS](https://lichess.org/terms-of-service) profile: $ref: './Profile.yaml' seenAt: diff --git a/doc/specs/schemas/UserExtended.yaml b/doc/specs/schemas/UserExtended.yaml index 0dde892..21a1ae5 100644 --- a/doc/specs/schemas/UserExtended.yaml +++ b/doc/specs/schemas/UserExtended.yaml @@ -35,3 +35,4 @@ allOf: followsYou: type: boolean example: false + diff --git a/doc/specs/tags/users/api-user-username.yaml b/doc/specs/tags/users/api-user-username.yaml index cc029e5..b6d92eb 100644 --- a/doc/specs/tags/users/api-user-username.yaml +++ b/doc/specs/tags/users/api-user-username.yaml @@ -9,6 +9,7 @@ get: - Users security: - OAuth2: [] + parameters: - in: path name: username @@ -21,6 +22,7 @@ get: schema: type: boolean default: false + responses: "200": description: The information of the user.