Give all errors a schema reference

This just helps keep an overall structure
pull/1373/head
Travis Ralston 6 years ago
parent 7cd22f5690
commit caa6d4d9ad

@ -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":

@ -82,6 +82,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":
@ -133,5 +135,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

@ -218,6 +218,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

@ -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,6 +93,8 @@ 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:

@ -110,6 +110,8 @@ 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:
@ -206,6 +208,8 @@ 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:

@ -81,5 +81,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

@ -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.

@ -167,12 +167,16 @@ 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:

@ -228,7 +228,7 @@ 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:

@ -438,7 +438,7 @@ 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:

@ -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.
@ -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."
@ -420,6 +422,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"
429: 429:
description: This request was rate-limited. description: This request was rate-limited.
schema: schema:

@ -126,6 +126,8 @@ 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:

@ -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,7 +75,7 @@ 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:

Loading…
Cancel
Save