mod_rest: List all error conditions in OpenAPI spec
These are not handled by datamanager but by util.stanza and util.error,
so they are not represented in the JSON schema file.
--- a/mod_rest/res/openapi.yaml Fri Jun 16 00:10:46 2023 +0200
+++ b/mod_rest/res/openapi.yaml Sat Jun 17 16:26:33 2023 +0200
@@ -1317,7 +1317,29 @@
condition:
description: Specific error condition.
type: string
- # enum: [ full list available in RFC 6120 ]
+ enum:
+ - bad-request
+ - conflict
+ - feature-not-implemented
+ - forbidden
+ - gone
+ - internal-server-error
+ - item-not-found
+ - jid-malformed
+ - not-acceptable
+ - not-allowed
+ - not-authorized
+ - policy-violation
+ - recipient-unavailable
+ - redirect
+ - registration-required
+ - remote-server-not-found
+ - remote-server-timeout
+ - resource-constraint
+ - service-unavailable
+ - subscription-required
+ - undefined-condition
+ - unexpected-request
code:
description: Legacy numeric error code. Similar to HTTP status codes.
type: integer