Merge pull request #1373 from turt2live/travis/better-errors

Spell out rate limit error schema & give all errors schemas
pull/977/head
Travis Ralston 8 years ago committed by GitHub
commit 2e5f530cca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -131,7 +131,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED" "errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
403: 403:
description: |- description: |-
The credentials supplied by the homeserver were rejected. The credentials supplied by the homeserver were rejected.
@ -140,7 +140,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_FORBIDDEN" "errcode": "COM.EXAMPLE.MYAPPSERVICE_FORBIDDEN"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
404: 404:
description: |- description: |-
The application service indicates that this room alias does not exist. The application service indicates that this room alias does not exist.
@ -150,7 +150,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND" "errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
"/users/{userId}": "/users/{userId}":
get: get:
summary: Query if a user should exist on the application service. summary: Query if a user should exist on the application service.
@ -187,7 +187,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED" "errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
403: 403:
description: |- description: |-
The credentials supplied by the homeserver were rejected. The credentials supplied by the homeserver were rejected.
@ -196,7 +196,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_FORBIDDEN" "errcode": "COM.EXAMPLE.MYAPPSERVICE_FORBIDDEN"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
404: 404:
description: |- description: |-
The application service indicates that this user does not exist. The application service indicates that this user does not exist.
@ -206,7 +206,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND" "errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
"/_matrix/app/unstable/thirdparty/protocol/{protocol}": "/_matrix/app/unstable/thirdparty/protocol/{protocol}":
get: get:
summary: Retrieve metadata about a specific protocol that the application service supports. summary: Retrieve metadata about a specific protocol that the application service supports.
@ -236,7 +236,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED" "errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
403: 403:
description: |- description: |-
The credentials supplied by the homeserver were rejected. The credentials supplied by the homeserver were rejected.
@ -245,7 +245,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_FORBIDDEN" "errcode": "COM.EXAMPLE.MYAPPSERVICE_FORBIDDEN"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
404: 404:
description: No protocol was found with the given path. description: No protocol was found with the given path.
examples: examples:
@ -253,7 +253,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND" "errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
"/_matrix/app/unstable/thirdparty/user/{protocol}": "/_matrix/app/unstable/thirdparty/user/{protocol}":
get: get:
summary: Retrieve the Matrix User ID of a corresponding third party user. summary: Retrieve the Matrix User ID of a corresponding third party user.
@ -289,7 +289,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED" "errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
403: 403:
description: |- description: |-
The credentials supplied by the homeserver were rejected. The credentials supplied by the homeserver were rejected.
@ -298,7 +298,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_FORBIDDEN" "errcode": "COM.EXAMPLE.MYAPPSERVICE_FORBIDDEN"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
404: 404:
description: No users were found with the given parameters. description: No users were found with the given parameters.
examples: examples:
@ -306,7 +306,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND" "errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
"/_matrix/app/unstable/thirdparty/location/{protocol}": "/_matrix/app/unstable/thirdparty/location/{protocol}":
get: get:
summary: Retreive Matrix-side portal rooms leading to a third party location. summary: Retreive Matrix-side portal rooms leading to a third party location.
@ -340,7 +340,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED" "errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
403: 403:
description: |- description: |-
The credentials supplied by the homeserver were rejected. The credentials supplied by the homeserver were rejected.
@ -349,7 +349,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_FORBIDDEN" "errcode": "COM.EXAMPLE.MYAPPSERVICE_FORBIDDEN"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
404: 404:
description: No mappings were found with the given parameters. description: No mappings were found with the given parameters.
examples: examples:
@ -357,7 +357,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND" "errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
"/_matrix/app/unstable/thirdparty/location": "/_matrix/app/unstable/thirdparty/location":
get: get:
summary: Reverse-lookup third party locations given a Matrix room alias. summary: Reverse-lookup third party locations given a Matrix room alias.
@ -385,7 +385,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED" "errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
403: 403:
description: |- description: |-
The credentials supplied by the homeserver were rejected. The credentials supplied by the homeserver were rejected.
@ -394,7 +394,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_FORBIDDEN" "errcode": "COM.EXAMPLE.MYAPPSERVICE_FORBIDDEN"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
404: 404:
description: No mappings were found with the given parameters. description: No mappings were found with the given parameters.
examples: examples:
@ -402,7 +402,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND" "errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
"/_matrix/app/unstable/thirdparty/user": "/_matrix/app/unstable/thirdparty/user":
get: get:
summary: Reverse-lookup third party users given a Matrix User ID. summary: Reverse-lookup third party users given a Matrix User ID.
@ -429,7 +429,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED" "errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
403: 403:
description: |- description: |-
The credentials supplied by the homeserver were rejected. The credentials supplied by the homeserver were rejected.
@ -438,7 +438,7 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED" "errcode": "COM.EXAMPLE.MYAPPSERVICE_UNAUTHORIZED"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml
404: 404:
description: No mappings were found with the given parameters. description: No mappings were found with the given parameters.
examples: examples:
@ -446,4 +446,4 @@ paths:
"errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND" "errcode": "COM.EXAMPLE.MYAPPSERVICE_NOT_FOUND"
} }
schema: schema:
$ref: ../client-server/definitions/error.yaml $ref: ../client-server/definitions/errors/error.yaml

@ -129,6 +129,8 @@ paths:
"errcode": "M_THREEPID_AUTH_FAILED", "errcode": "M_THREEPID_AUTH_FAILED",
"error": "The third party credentials could not be verified by the identity server." "error": "The third party credentials could not be verified by the identity server."
} }
schema:
"$ref": "definitions/errors/error.yaml"
tags: tags:
- User data - User data
"/account/3pid/email/requestToken": "/account/3pid/email/requestToken":

@ -83,6 +83,8 @@ paths:
"errcode": "M_FORBIDDEN", "errcode": "M_FORBIDDEN",
"error": "You do not have a high enough power level to ban from this room." "error": "You do not have a high enough power level to ban from this room."
} }
schema:
"$ref": "definitions/errors/error.yaml"
tags: tags:
- Room membership - Room membership
"/rooms/{roomId}/unban": "/rooms/{roomId}/unban":
@ -134,5 +136,7 @@ paths:
"errcode": "M_FORBIDDEN", "errcode": "M_FORBIDDEN",
"error": "You do not have a high enough power level to unban from this room." "error": "You do not have a high enough power level to unban from this room."
} }
schema:
"$ref": "definitions/errors/error.yaml"
tags: tags:
- Room membership - Room membership

@ -72,7 +72,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Media - Media
"/download/{serverName}/{mediaId}": "/download/{serverName}/{mediaId}":
@ -120,7 +120,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Media - Media
"/download/{serverName}/{mediaId}/{fileName}": "/download/{serverName}/{mediaId}/{fileName}":
@ -175,7 +175,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Media - Media
"/thumbnail/{serverName}/{mediaId}": "/thumbnail/{serverName}/{mediaId}":
@ -241,7 +241,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Media - Media
"/preview_url": "/preview_url":
@ -296,7 +296,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Media - Media
"/config": "/config":
@ -336,7 +336,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/error.yaml"
tags: tags:
- Media - Media

@ -216,6 +216,8 @@ paths:
invalid: for example, the user's ``power_level`` is set below invalid: for example, the user's ``power_level`` is set below
that necessary to set the room name (``errcode`` set to that necessary to set the room name (``errcode`` set to
``M_INVALID_ROOM_STATE``). ``M_INVALID_ROOM_STATE``).
schema:
"$ref": "definitions/errors/error.yaml"
tags: tags:
- Room creation - Room creation

@ -17,7 +17,9 @@ properties:
errcode: errcode:
type: string type: string
description: An error code. description: An error code.
example: M_UNKNOWN
error: error:
type: string type: string
description: A human-readable error message. description: A human-readable error message.
example: An unknown error occurred
required: ["errcode"] required: ["errcode"]

@ -0,0 +1,32 @@
# Copyright 2018 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
$ref: error.yaml
type: object
description: The rate limit was reached for this request
properties:
errcode:
type: string
description: The M_LIMIT_EXCEEDED error code
example: M_LIMIT_EXCEEDED
error:
type: string
description: A human-readable error message.
example: Too many requests
retry_after_ms:
type: integer
description: |-
The amount of time in milliseconds the client should wait
before trying the request again.
example: 2000
required: ["errcode"]

@ -68,6 +68,8 @@ paths:
"errcode": "M_UNKNOWN", "errcode": "M_UNKNOWN",
"error": "Room alias #monkeys:matrix.org already exists." "error": "Room alias #monkeys:matrix.org already exists."
} }
schema:
"$ref": "definitions/errors/error.yaml"
tags: tags:
- Room directory - Room directory
get: get:
@ -118,6 +120,8 @@ paths:
"errcode": "M_NOT_FOUND", "errcode": "M_NOT_FOUND",
"error": "Room alias #monkeys:matrix.org not found." "error": "Room alias #monkeys:matrix.org not found."
} }
schema:
"$ref": "definitions/errors/error.yaml"
tags: tags:
- Room directory - Room directory
delete: delete:

@ -93,9 +93,11 @@ paths:
examples: examples:
application/json: { application/json: {
"errcode": "M_FORBIDDEN", "error": "@cheeky_monkey:matrix.org is banned from the room"} "errcode": "M_FORBIDDEN", "error": "@cheeky_monkey:matrix.org is banned from the room"}
schema:
"$ref": "definitions/errors/error.yaml"
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room membership - Room membership

@ -110,10 +110,12 @@ paths:
examples: examples:
application/json: { application/json: {
"errcode": "M_FORBIDDEN", "error": "You are not invited to this room."} "errcode": "M_FORBIDDEN", "error": "You are not invited to this room."}
schema:
"$ref": "definitions/errors/error.yaml"
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room membership - Room membership
"/join/{roomIdOrAlias}": "/join/{roomIdOrAlias}":
@ -215,9 +217,11 @@ paths:
examples: examples:
application/json: { application/json: {
"errcode": "M_FORBIDDEN", "error": "You are not invited to this room."} "errcode": "M_FORBIDDEN", "error": "You are not invited to this room."}
schema:
"$ref": "definitions/errors/error.yaml"
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room membership - Room membership

@ -87,5 +87,7 @@ paths:
"errcode": "M_FORBIDDEN", "errcode": "M_FORBIDDEN",
"error": "You do not have a high enough power level to kick from this room." "error": "You do not have a high enough power level to kick from this room."
} }
schema:
"$ref": "definitions/errors/error.yaml"
tags: tags:
- Room membership - Room membership

@ -64,7 +64,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room membership - Room membership
"/rooms/{roomId}/forget": "/rooms/{roomId}/forget":
@ -107,10 +107,10 @@ paths:
"error": "User @example:matrix.org is in room !au1ba7o:matrix.org" "error": "User @example:matrix.org is in room !au1ba7o:matrix.org"
} }
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/error.yaml"
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room membership - Room membership

@ -59,6 +59,8 @@ paths:
"errcode": "M_NOT_FOUND", "errcode": "M_NOT_FOUND",
"error": "Room not found" "error": "Room not found"
} }
schema:
"$ref": "definitions/errors/error.yaml"
put: put:
summary: Sets the visibility of a room in the room directory summary: Sets the visibility of a room in the room directory
description: |- description: |-
@ -107,6 +109,8 @@ paths:
"errcode": "M_NOT_FOUND", "errcode": "M_NOT_FOUND",
"error": "Room not found" "error": "Room not found"
} }
schema:
"$ref": "definitions/errors/error.yaml"
"/publicRooms": "/publicRooms":
get: get:
summary: Lists the public rooms on the server. summary: Lists the public rooms on the server.

@ -61,7 +61,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Session management - Session management
post: post:
@ -167,15 +167,19 @@ paths:
"errcode": "M_UNKNOWN", "errcode": "M_UNKNOWN",
"error": "Bad login type." "error": "Bad login type."
} }
schema:
"$ref": "definitions/errors/error.yaml"
403: 403:
description: |- description: |-
The login attempt failed. For example, the password may have been incorrect. The login attempt failed. For example, the password may have been incorrect.
examples: examples:
application/json: { application/json: {
"errcode": "M_FORBIDDEN"} "errcode": "M_FORBIDDEN"}
schema:
"$ref": "definitions/errors/error.yaml"
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Session management - Session management

@ -75,7 +75,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Presence - Presence
get: get:
@ -123,6 +123,8 @@ paths:
description: |- description: |-
There is no presence state for this user. This user may not exist or There is no presence state for this user. This user may not exist or
isn't exposing presence information to you. isn't exposing presence information to you.
schema:
"$ref": "definitions/errors/error.yaml"
403: 403:
description: You are not allowed to see this user's presence status. description: You are not allowed to see this user's presence status.
examples: examples:
@ -131,7 +133,7 @@ paths:
"error": "You are not allowed to see their presence" "error": "You are not allowed to see their presence"
} }
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/error.yaml"
tags: tags:
- Presence - Presence
"/presence/list/{userId}": "/presence/list/{userId}":
@ -187,7 +189,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Presence - Presence
get: get:

@ -67,7 +67,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data
get: get:
@ -141,7 +141,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data
get: get:

@ -228,10 +228,10 @@ paths:
"errcode": "M_MISSING_PARAM" "errcode": "M_MISSING_PARAM"
} }
schema: schema:
type: object "$ref": "definitions/errors/error.yaml"
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Push notifications - Push notifications

@ -438,11 +438,11 @@ paths:
"errcode": "M_UNKNOWN" "errcode": "M_UNKNOWN"
} }
schema: schema:
type: object "$ref": "definitions/errors/error.yaml"
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Push notifications - Push notifications
"/pushrules/{scope}/{kind}/{ruleId}/enabled": "/pushrules/{scope}/{kind}/{ruleId}/enabled":

@ -76,6 +76,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room participation - Room participation

@ -177,6 +177,8 @@ paths:
"errcode": "M_USER_IN_USE", "errcode": "M_USER_IN_USE",
"error": "Desired user ID is already taken." "error": "Desired user ID is already taken."
} }
schema:
"$ref": "definitions/errors/error.yaml"
401: 401:
description: |- description: |-
The homeserver requires additional authentication information. The homeserver requires additional authentication information.
@ -185,7 +187,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data
"/register/email/requestToken": "/register/email/requestToken":
@ -249,7 +251,7 @@ paths:
"error": "The specified address is already in use" "error": "The specified address is already in use"
} }
schema: schema:
type: object "$ref": "definitions/errors/error.yaml"
"/account/password": "/account/password":
post: post:
summary: "Changes a user's password." summary: "Changes a user's password."
@ -296,7 +298,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data
"/account/password/email/requestToken": "/account/password/email/requestToken":
@ -363,7 +365,7 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data
"/register/available": "/register/available":
@ -420,9 +422,11 @@ paths:
"errcode": "M_USER_IN_USE", "errcode": "M_USER_IN_USE",
"error": "Desired user ID is already taken." "error": "Desired user ID is already taken."
} }
schema:
"$ref": "definitions/errors/error.yaml"
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data

@ -367,6 +367,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Search - Search

@ -66,7 +66,7 @@ paths:
"errcode": "M_NOT_FOUND" "errcode": "M_NOT_FOUND"
} }
schema: schema:
$ref: definitions/error.yaml $ref: definitions/errors/error.yaml
"/thirdparty/location/{protocol}": "/thirdparty/location/{protocol}":
get: get:
summary: Retreive Matrix-side portals rooms leading to a third party location. summary: Retreive Matrix-side portals rooms leading to a third party location.
@ -105,7 +105,7 @@ paths:
"errcode": "M_NOT_FOUND" "errcode": "M_NOT_FOUND"
} }
schema: schema:
$ref: definitions/error.yaml $ref: definitions/errors/error.yaml
"/thirdparty/user/{protocol}": "/thirdparty/user/{protocol}":
get: get:
summary: Retrieve the Matrix User ID of a corresponding third party user. summary: Retrieve the Matrix User ID of a corresponding third party user.
@ -138,7 +138,7 @@ paths:
"errcode": "M_NOT_FOUND" "errcode": "M_NOT_FOUND"
} }
schema: schema:
$ref: definitions/error.yaml $ref: definitions/errors/error.yaml
"/thirdparty/location": "/thirdparty/location":
get: get:
summary: Reverse-lookup third party locations given a Matrix room alias. summary: Reverse-lookup third party locations given a Matrix room alias.
@ -165,7 +165,7 @@ paths:
"errcode": "M_NOT_FOUND" "errcode": "M_NOT_FOUND"
} }
schema: schema:
$ref: definitions/error.yaml $ref: definitions/errors/error.yaml
"/thirdparty/user": "/thirdparty/user":
get: get:
summary: Reverse-lookup third party users given a Matrix User ID. summary: Reverse-lookup third party users given a Matrix User ID.
@ -191,4 +191,4 @@ paths:
"errcode": "M_NOT_FOUND" "errcode": "M_NOT_FOUND"
} }
schema: schema:
$ref: definitions/error.yaml $ref: definitions/errors/error.yaml

@ -126,9 +126,11 @@ paths:
examples: examples:
application/json: { application/json: {
"errcode": "M_FORBIDDEN", "error": "@cheeky_monkey:matrix.org is banned from the room"} "errcode": "M_FORBIDDEN", "error": "@cheeky_monkey:matrix.org is banned from the room"}
schema:
"$ref": "definitions/errors/error.yaml"
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room membership - Room membership

@ -82,6 +82,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- Room participation - Room participation

@ -95,6 +95,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data

@ -73,6 +73,6 @@ paths:
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- VOIP - VOIP

@ -65,7 +65,7 @@ paths:
"error": "Unrecognised access token." "error": "Unrecognised access token."
} }
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/error.yaml"
403: 403:
description: description:
The appservice cannot masquerade as the user or has not registered them. The appservice cannot masquerade as the user or has not registered them.
@ -75,10 +75,10 @@ paths:
"error": "Application service has not registered this user." "error": "Application service has not registered this user."
} }
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/error.yaml"
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:
"$ref": "definitions/error.yaml" "$ref": "definitions/errors/rate_limited.yaml"
tags: tags:
- User data - User data

@ -0,0 +1 @@
Describe the rate limit error response schema
Loading…
Cancel
Save