# HG changeset patch # User Kim Alvefur # Date 1614541652 -3600 # Node ID 356b5ad521a5a6f833ac0541ce20322b7e838a87 # Parent 7ab0c423688a43c3bad4eef70490bf78aec2f07a mod_rest: Add schema for errors I forget, are these util.error objects in the json mapping? diff -r 7ab0c423688a -r 356b5ad521a5 mod_rest/openapi.yaml --- 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.