diff --git a/data/api/client-server/account-data.yaml b/data/api/client-server/account-data.yaml index 7013093c..ff276a95 100644 --- a/data/api/client-server/account-data.yaml +++ b/data/api/client-server/account-data.yaml @@ -74,15 +74,30 @@ paths: 400: description: |- The request body is not a JSON object. + examples: + application/json: { + "errcode": "M_BAD_JSON", + "error": "Content must be a JSON object." + } schema: $ref: "../client-server/definitions/errors/error.yaml" 403: description: |- The access token provided is not authorized to modify this user's account data. + examples: + application/json: { + "errcode": "M_FORBIDDEN", + "error": "Cannot add account data for other users." + } schema: $ref: "../client-server/definitions/errors/error.yaml" 405: + examples: + application/json: { + "errcode": "M_BAD_JSON", + "error": "Cannot set m.fully_read through this API." + } description: |- This `type` of account data is controlled by the server; it cannot be modified by clients. @@ -127,11 +142,21 @@ paths: description: |- The access token provided is not authorized to retrieve this user's account data. + examples: + application/json: { + "errcode": "M_FORBIDDEN", + "error": "Cannot add account data for other users." + } schema: $ref: "../client-server/definitions/errors/error.yaml" 404: description: |- No account data has been provided for this user with the given `type`. + examples: + application/json: { + "errcode": "M_NOT_FOUND", + "error": "Room account data not found." + } schema: $ref: "../client-server/definitions/errors/error.yaml" tags: @@ -190,18 +215,33 @@ paths: 400: description: |- The request body is not a JSON object. + examples: + application/json: { + "errcode": "M_BAD_JSON", + "error": "Content must be a JSON object." + } schema: $ref: "../client-server/definitions/errors/error.yaml" 403: description: |- The access token provided is not authorized to modify this user's account data. + examples: + application/json: { + "errcode": "M_FORBIDDEN", + "error": "Cannot add account data for other users." + } schema: $ref: "../client-server/definitions/errors/error.yaml" 405: description: |- This `type` of account data is controlled by the server; it cannot be modified by clients. + examples: + application/json: { + "errcode": "M_BAD_JSON", + "error": "Cannot set m.fully_read through this API." + } schema: $ref: "../client-server/definitions/errors/error.yaml" tags: @@ -250,12 +290,22 @@ paths: description: |- The access token provided is not authorized to retrieve this user's account data. + examples: + application/json: { + "errcode": "M_FORBIDDEN", + "error": "Cannot add account data for other users." + } schema: $ref: "../client-server/definitions/errors/error.yaml" 404: description: |- No account data has been provided for this user and this room with the given `type`. + examples: + application/json: { + "errcode": "M_NOT_FOUND", + "error": "Room account data not found." + } schema: $ref: "../client-server/definitions/errors/error.yaml" tags: