mod_rest: List all error conditions in OpenAPI spec
authorKim Alvefur <zash@zash.se>
Sat, 17 Jun 2023 16:26:33 +0200
changeset 5555 8bfcedd93a72
parent 5554 4fda06be6b08
child 5556 12828e969a60
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.
mod_rest/res/openapi.yaml
--- 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