From e9fd52da013b5392b8731b8a013bfa9da765b6c8 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 12 Jan 2022 17:41:20 -0800 Subject: [PATCH] openapi: Mark subscribe error as a JsonError. This was a oneOf with two identical branches modulo example, which is always a bug because oneOf means exclusive or. But the example for the first branch did not fit the schema for AddSubscriptionsResponse, which is a subset of JsonSuccessBase. Signed-off-by: Anders Kaseorg --- zerver/openapi/zulip.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml index 0fa4065c58..6f05b2dca7 100644 --- a/zerver/openapi/zulip.yaml +++ b/zerver/openapi/zulip.yaml @@ -6724,13 +6724,13 @@ paths: A typical successful JSON response when the user is already subscribed to the streams specified "400": - description: Success. + description: Bad request. content: application/json: schema: oneOf: - allOf: - - $ref: "#/components/schemas/AddSubscriptionsResponse" + - $ref: "#/components/schemas/JsonError" - example: { "msg": "Unable to access stream (private_stream).",