From 6fac83d54fb37cea3deecbda741c3b973584d07f Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Fri, 1 Sep 2023 21:12:26 +0200 Subject: [PATCH] api-docs: Fix RateLimitedError schema. --- zerver/openapi/zulip.yaml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml index 3d96f27f4d..7ace608485 100644 --- a/zerver/openapi/zulip.yaml +++ b/zerver/openapi/zulip.yaml @@ -19307,14 +19307,8 @@ components: A typical failed json response for when user's account is deactivated: RateLimitedError: allOf: - - $ref: "#/components/schemas/CodedError" - - example: - { - "code": "RATE_LIMIT_HIT", - "msg": "API usage exceeded rate limit", - "result": "error", - "retry-after": 28.706807374954224, - } + - $ref: "#/components/schemas/CodedErrorBase" + - additionalProperties: false description: | ## Rate limit exceeded @@ -19330,6 +19324,22 @@ components: A typical failed JSON response for when a rate limit is exceeded: [rate-limit-headers]: /api/http-headers#rate-limiting-response-headers + properties: + result: {} + msg: {} + code: {} + retry-after: + type: integer + description: | + How many seconds the client must wait before making + additional requests. + example: + { + "code": "RATE_LIMIT_HIT", + "msg": "API usage exceeded rate limit", + "result": "error", + "retry-after": 28.706807374954224, + } RealmDeactivatedError: allOf: - $ref: "#/components/schemas/CodedError"