mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
openapi: Rearrange users/{user_id}/subscriptions/{stream_id} docs.
This commit moves docs for users/{user_id}/subscriptions/{stream_id}
enndpoint to be after users/me/subscriptions/muted_topics docs.
We are rearranging the docs because after adding the new patch
endpoint for users/{user_id}/subscriptions/{stream_id}, openapi_core
validator tries to match 'users/me/subscriptions/muted_topics'
with 'users/{user_id}/subscriptions/{stream_id}' path in zulip.yaml
and thus gives error while running tests.
This is a bug in 'openapi_core' as it does not follows OpenAPI specs
to match concrete paths before their templated counterparts. Thus,
this commit rearranges the docs such that openapi_core validator
tries to match muted_topics endpoint with the correct path in
zulip.yaml docs.
This commit is contained in:
@@ -4966,34 +4966,6 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/NonExistingStreamError"
|
||||
/users/{user_id}/subscriptions/{stream_id}:
|
||||
get:
|
||||
operationId: get_subscription_status
|
||||
tags: ["streams"]
|
||||
description: |
|
||||
Check whether a user is subscribed to a stream.
|
||||
|
||||
`GET {{ api_url }}/v1/users/{user_id}/subscriptions/{stream_id}`
|
||||
|
||||
**Changes**: New in Zulip 3.0 (feature level 11).
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/UserId"
|
||||
- $ref: "#/components/parameters/StreamIdInPath"
|
||||
responses:
|
||||
"200":
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/JsonSuccess"
|
||||
- properties:
|
||||
is_subscribed:
|
||||
type: boolean
|
||||
description: |
|
||||
Whether the user is subscribed to the stream.
|
||||
- example:
|
||||
{"msg": "", "result": "success", "is_subscribed": false}
|
||||
/users/me/subscriptions/muted_topics:
|
||||
patch:
|
||||
operationId: mute_topic
|
||||
@@ -5063,6 +5035,34 @@ paths:
|
||||
- $ref: "#/components/schemas/JsonError"
|
||||
- example:
|
||||
{"msg": "Topic is not muted", "result": "error"}
|
||||
/users/{user_id}/subscriptions/{stream_id}:
|
||||
get:
|
||||
operationId: get_subscription_status
|
||||
tags: ["streams"]
|
||||
description: |
|
||||
Check whether a user is subscribed to a stream.
|
||||
|
||||
`GET {{ api_url }}/v1/users/{user_id}/subscriptions/{stream_id}`
|
||||
|
||||
**Changes**: New in Zulip 3.0 (feature level 11).
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/UserId"
|
||||
- $ref: "#/components/parameters/StreamIdInPath"
|
||||
responses:
|
||||
"200":
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/JsonSuccess"
|
||||
- properties:
|
||||
is_subscribed:
|
||||
type: boolean
|
||||
description: |
|
||||
Whether the user is subscribed to the stream.
|
||||
- example:
|
||||
{"msg": "", "result": "success", "is_subscribed": false}
|
||||
/realm/emoji/{emoji_name}:
|
||||
post:
|
||||
operationId: upload_custom_emoji
|
||||
|
||||
Reference in New Issue
Block a user