mod_rest: Add schema for errors
I forget, are these util.error objects in the json mapping?
--- 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.