diff --git a/doc/redocly.yaml b/doc/redocly.yaml index 5d273f5..3feb0ed 100644 --- a/doc/redocly.yaml +++ b/doc/redocly.yaml @@ -3,7 +3,7 @@ theme: htmlTemplate: ./template.hbs extends: - - recommended + - recommended-strict rules: operation-4xx-response: off 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/Title.yaml b/doc/specs/schemas/Title.yaml index b201ad6..5f36b1b 100644 --- a/doc/specs/schemas/Title.yaml +++ b/doc/specs/schemas/Title.yaml @@ -1,3 +1,4 @@ type: string enum: [GM, WGM, IM, WIM, FM, WFM, NM, CM, WCM, WNM, LM, BOT] example: NM +description: only appears if the user is a titled player or a bot user diff --git a/doc/specs/schemas/User.yaml b/doc/specs/schemas/User.yaml index 737c399..5e7f0e7 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 marked for the 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..87c9452 100644 --- a/doc/specs/schemas/UserExtended.yaml +++ b/doc/specs/schemas/UserExtended.yaml @@ -26,12 +26,18 @@ allOf: followable: type: boolean example: true + description: only appears if the request is [authenticated with OAuth2](#section/Introduction/Authentication) following: type: boolean example: false + description: only appears if the request is [authenticated with OAuth2](#section/Introduction/Authentication) blocking: type: boolean example: false + description: only appears if the request is [authenticated with OAuth2](#section/Introduction/Authentication) followsYou: type: boolean example: false + description: only appears if the request is [authenticated with OAuth2](#section/Introduction/Authentication) + + diff --git a/doc/specs/tags/users/api-user-username.yaml b/doc/specs/tags/users/api-user-username.yaml index cc029e5..0bf1aa3 100644 --- a/doc/specs/tags/users/api-user-username.yaml +++ b/doc/specs/tags/users/api-user-username.yaml @@ -3,12 +3,11 @@ get: summary: Get user public data description: | Read public data of a user. - If the request is [authenticated with OAuth2](#section/Introduction/Authentication), - then extra fields might be present in the response: `followable`, `following`, `blocking`, `followsYou`. tags: - Users security: - OAuth2: [] + parameters: - in: path name: username @@ -21,6 +20,7 @@ get: schema: type: boolean default: false + responses: "200": description: The information of the user.