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 <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-01-12 17:41:20 -08:00 committed by Tim Abbott
parent a503d19eae
commit e9fd52da01

View File

@ -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).",