Software /
code /
prosody-modules
Changeset
4479:356b5ad521a5
mod_rest: Add schema for errors
I forget, are these util.error objects in the json mapping?
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 28 Feb 2021 20:47:32 +0100 |
parents | 4478:7ab0c423688a |
children | 4480:dad0367d33e8 |
files | mod_rest/openapi.yaml |
diffstat | 1 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_rest/openapi.yaml Sun Feb 28 19:33:09 2021 +0100 +++ b/mod_rest/openapi.yaml Sun Feb 28 20:47:32 2021 +0100 @@ -250,6 +250,8 @@ $ref: '#/components/schemas/thread' command: $ref: '#/components/schemas/command' + error: + $ref: '#/components/schemas/error' type: object example: body: Hello @@ -541,6 +543,29 @@ nick: type: string description: Nickname of the sender + error: + type: object + description: Description of something gone wrong. See the Stanza Errors section in RFC 6120. + properties: + type: + description: General category of error + type: string + enum: + - auth + - cancel + - continue + - modify + - wait + condition: + description: Specific error condition. + type: string + # enum: [ full list available in RFC 6120 ] + code: + description: Legacy numeric error code. Similar to HTTP status codes. + type: integer + text: + description: Description of error intended for human eyes. + type: string securitySchemes: token: description: Tokens from mod_http_oauth2.