mirror of https://github.com/zulip/zulip.git
openapi: Fix allOf usage to conform to the OpenAPI specification.
yamole preprocesses our schema by naïvely merging all the objects in an allOf array together, but this fails to capture the meaning of allOf according to the OpenAPI specification. allOf is supposed to be a strict logical intersection of each subschema interpreted independently. It does not combine their properties maps before interpreting additionalProperties. So according to the old definition of JsonSuccess, every response is invalid: allOf: - additionalProperties: false properties: result: type: string - required: - result - msg properties: msg: type: string because the first subschema disallowed msg and the second subschema required msg. To fix this, whenever we use allOf for schema “inheritence”, the base schema must not specify additionalProperties, and the child schema must explicitly list all properties recursively inherited from the base schema in any subschema that uses additionalProperties. Fixes #16109. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
c5765c9da6
commit
fb2d7c6741
|
@ -146,8 +146,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
events:
|
events:
|
||||||
type: array
|
type: array
|
||||||
description: |
|
description: |
|
||||||
|
@ -1192,8 +1195,14 @@ paths:
|
||||||
Event sent when a reaction is added to a message.
|
Event sent when a reaction is added to a message.
|
||||||
Sent to all users who were recipients of the message.
|
Sent to all users who were recipients of the message.
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/EmojiReaction"
|
- $ref: "#/components/schemas/EmojiReactionBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
emoji_code: {}
|
||||||
|
emoji_name: {}
|
||||||
|
reaction_type: {}
|
||||||
|
user_id: {}
|
||||||
|
user: {}
|
||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
type:
|
type:
|
||||||
|
@ -1230,8 +1239,14 @@ paths:
|
||||||
Event sent when a reaction is removed from a message.
|
Event sent when a reaction is removed from a message.
|
||||||
Sent to all users who were recipients of the message.
|
Sent to all users who were recipients of the message.
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/EmojiReaction"
|
- $ref: "#/components/schemas/EmojiReactionBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
emoji_code: {}
|
||||||
|
emoji_name: {}
|
||||||
|
reaction_type: {}
|
||||||
|
user_id: {}
|
||||||
|
user: {}
|
||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
type:
|
type:
|
||||||
|
@ -2989,8 +3004,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
stream_id:
|
stream_id:
|
||||||
type: integer
|
type: integer
|
||||||
description: |
|
description: |
|
||||||
|
@ -3091,8 +3109,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
attachments:
|
attachments:
|
||||||
type: array
|
type: array
|
||||||
description: |
|
description: |
|
||||||
|
@ -3252,8 +3273,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
anchor:
|
anchor:
|
||||||
type: integer
|
type: integer
|
||||||
description: |
|
description: |
|
||||||
|
@ -3436,8 +3460,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
description: |
|
description: |
|
||||||
|
@ -3487,8 +3514,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
message_history:
|
message_history:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -3621,8 +3651,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
messages:
|
messages:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -3648,8 +3681,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
rendered:
|
rendered:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -3797,8 +3833,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
messages:
|
messages:
|
||||||
type: object
|
type: object
|
||||||
description: |
|
description: |
|
||||||
|
@ -3858,8 +3897,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
raw_content:
|
raw_content:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -4030,8 +4072,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
uri:
|
uri:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -4072,8 +4117,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
url:
|
url:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -4105,8 +4153,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
members:
|
members:
|
||||||
type: array
|
type: array
|
||||||
description: |
|
description: |
|
||||||
|
@ -4230,8 +4281,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
user_id:
|
user_id:
|
||||||
type: integer
|
type: integer
|
||||||
description: |
|
description: |
|
||||||
|
@ -4310,8 +4364,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
presence:
|
presence:
|
||||||
type: object
|
type: object
|
||||||
description: |
|
description: |
|
||||||
|
@ -4372,8 +4429,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
avatar_url:
|
avatar_url:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -4561,8 +4621,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
topics:
|
topics:
|
||||||
type: array
|
type: array
|
||||||
description: |
|
description: |
|
||||||
|
@ -4623,11 +4686,14 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
# TODO: Is this the best way to declare required elements in 200 responses?
|
# TODO: Is this the best way to declare required elements in 200 responses?
|
||||||
- required:
|
- required:
|
||||||
- subscriptions
|
- subscriptions
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
subscriptions:
|
subscriptions:
|
||||||
type: array
|
type: array
|
||||||
description: |
|
description: |
|
||||||
|
@ -4846,12 +4912,15 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- required:
|
- required:
|
||||||
- subscribed
|
- subscribed
|
||||||
- already_subscribed
|
- already_subscribed
|
||||||
- removed
|
- removed
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
subscribed:
|
subscribed:
|
||||||
type: object
|
type: object
|
||||||
description: |
|
description: |
|
||||||
|
@ -4933,8 +5002,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
not_removed:
|
not_removed:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -5051,8 +5123,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
is_subscribed:
|
is_subscribed:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: |
|
description: |
|
||||||
|
@ -5110,8 +5185,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
emoji:
|
emoji:
|
||||||
type: object
|
type: object
|
||||||
description: |
|
description: |
|
||||||
|
@ -5151,8 +5229,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
custom_fields:
|
custom_fields:
|
||||||
type: array
|
type: array
|
||||||
description: |
|
description: |
|
||||||
|
@ -5340,8 +5421,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
description: |
|
description: |
|
||||||
|
@ -5384,8 +5468,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
subscription_data:
|
subscription_data:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -5492,8 +5579,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
user:
|
user:
|
||||||
$ref: "#/components/schemas/User"
|
$ref: "#/components/schemas/User"
|
||||||
- example:
|
- example:
|
||||||
|
@ -5669,8 +5759,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
filters:
|
filters:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -5737,8 +5830,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
description: |
|
description: |
|
||||||
|
@ -5871,9 +5967,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- additionalProperties: false
|
- additionalProperties: false
|
||||||
- properties:
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
queue_id:
|
queue_id:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -6162,8 +6260,21 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/BasicStream"
|
- $ref: "#/components/schemas/BasicStreamBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
stream_id: {}
|
||||||
|
name: {}
|
||||||
|
description: {}
|
||||||
|
date_created: {}
|
||||||
|
invite_only: {}
|
||||||
|
rendered_description: {}
|
||||||
|
is_web_public: {}
|
||||||
|
stream_post_policy: {}
|
||||||
|
message_retention_days: {}
|
||||||
|
history_public_to_subscribers: {}
|
||||||
|
first_message_id: {}
|
||||||
|
is_announcement_only: {}
|
||||||
stream_weekly_traffic:
|
stream_weekly_traffic:
|
||||||
type: integer
|
type: integer
|
||||||
nullable: true
|
nullable: true
|
||||||
|
@ -7390,8 +7501,25 @@ paths:
|
||||||
contexts.
|
contexts.
|
||||||
items:
|
items:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/User"
|
- $ref: "#/components/schemas/UserBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
email: {}
|
||||||
|
is_bot: {}
|
||||||
|
avatar_url: {}
|
||||||
|
avatar_version: {}
|
||||||
|
full_name: {}
|
||||||
|
is_admin: {}
|
||||||
|
is_owner: {}
|
||||||
|
bot_type: {}
|
||||||
|
user_id: {}
|
||||||
|
bot_owner_id: {}
|
||||||
|
is_active: {}
|
||||||
|
is_guest: {}
|
||||||
|
timezone: {}
|
||||||
|
date_joined: {}
|
||||||
|
delivery_email: {}
|
||||||
|
profile_data: {}
|
||||||
is_cross_realm_bot:
|
is_cross_realm_bot:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: |
|
description: |
|
||||||
|
@ -7439,8 +7567,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
authentication_methods:
|
authentication_methods:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
@ -7810,8 +7941,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
enable_desktop_notifications:
|
enable_desktop_notifications:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: |
|
description: |
|
||||||
|
@ -7934,16 +8068,32 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
streams:
|
streams:
|
||||||
description: |
|
description: |
|
||||||
A list of `stream` objects with details on the requested streams.
|
A list of `stream` objects with details on the requested streams.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/BasicStream"
|
- $ref: "#/components/schemas/BasicStreamBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
stream_id: {}
|
||||||
|
name: {}
|
||||||
|
description: {}
|
||||||
|
date_created: {}
|
||||||
|
invite_only: {}
|
||||||
|
rendered_description: {}
|
||||||
|
is_web_public: {}
|
||||||
|
stream_post_policy: {}
|
||||||
|
message_retention_days: {}
|
||||||
|
history_public_to_subscribers: {}
|
||||||
|
first_message_id: {}
|
||||||
|
is_announcement_only: {}
|
||||||
is_default:
|
is_default:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: |
|
description: |
|
||||||
|
@ -8033,9 +8183,6 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonError"
|
- $ref: "#/components/schemas/JsonError"
|
||||||
- properties:
|
|
||||||
msg:
|
|
||||||
type: string
|
|
||||||
- example:
|
- example:
|
||||||
{
|
{
|
||||||
"code": "BAD_REQUEST",
|
"code": "BAD_REQUEST",
|
||||||
|
@ -8383,8 +8530,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
user_groups:
|
user_groups:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -8506,8 +8656,28 @@ paths:
|
||||||
- description: |
|
- description: |
|
||||||
A dict containing details on the message that triggered the
|
A dict containing details on the message that triggered the
|
||||||
outgoing webhook, in the format used by [`GET /messages`](/api/get-messages).
|
outgoing webhook, in the format used by [`GET /messages`](/api/get-messages).
|
||||||
- $ref: "#/components/schemas/Messages"
|
- $ref: "#/components/schemas/MessagesBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
avatar_url: {}
|
||||||
|
client: {}
|
||||||
|
content: {}
|
||||||
|
content_type: {}
|
||||||
|
display_recipient: {}
|
||||||
|
id: {}
|
||||||
|
is_me_message: {}
|
||||||
|
reactions: {}
|
||||||
|
recipient_id: {}
|
||||||
|
sender_email: {}
|
||||||
|
sender_full_name: {}
|
||||||
|
sender_id: {}
|
||||||
|
sender_realm_str: {}
|
||||||
|
stream_id: {}
|
||||||
|
subject: {}
|
||||||
|
topic_links: {}
|
||||||
|
submessages: {}
|
||||||
|
timestamp: {}
|
||||||
|
type: {}
|
||||||
rendered_content:
|
rendered_content:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -8556,8 +8726,11 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
url:
|
url:
|
||||||
description: |
|
description: |
|
||||||
The url for the Big Blue Button video call.
|
The url for the Big Blue Button video call.
|
||||||
|
@ -8644,10 +8817,26 @@ components:
|
||||||
The unique message ID. Messages should always be
|
The unique message ID. Messages should always be
|
||||||
displayed sorted by ID.
|
displayed sorted by ID.
|
||||||
BasicStream:
|
BasicStream:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/BasicStreamBase"
|
||||||
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
stream_id: {}
|
||||||
|
name: {}
|
||||||
|
description: {}
|
||||||
|
date_created: {}
|
||||||
|
invite_only: {}
|
||||||
|
rendered_description: {}
|
||||||
|
is_web_public: {}
|
||||||
|
stream_post_policy: {}
|
||||||
|
message_retention_days: {}
|
||||||
|
history_public_to_subscribers: {}
|
||||||
|
first_message_id: {}
|
||||||
|
is_announcement_only: {}
|
||||||
|
BasicStreamBase:
|
||||||
type: object
|
type: object
|
||||||
description: |
|
description: |
|
||||||
Object containing basic details about the stream.
|
Object containing basic details about the stream.
|
||||||
additionalProperties: false
|
|
||||||
properties:
|
properties:
|
||||||
stream_id:
|
stream_id:
|
||||||
type: integer
|
type: integer
|
||||||
|
@ -8742,8 +8931,21 @@ components:
|
||||||
**Changes**: Deprecated in Zulip 3.0 (feature level 1), use
|
**Changes**: Deprecated in Zulip 3.0 (feature level 1), use
|
||||||
`stream_post_policy` instead.
|
`stream_post_policy` instead.
|
||||||
BasicBot:
|
BasicBot:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/BasicBotBase"
|
||||||
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
user_id: {}
|
||||||
|
full_name: {}
|
||||||
|
api_key: {}
|
||||||
|
default_sending_stream: {}
|
||||||
|
default_events_register_stream: {}
|
||||||
|
default_all_public_streams: {}
|
||||||
|
avatar_url: {}
|
||||||
|
owner_id: {}
|
||||||
|
services: {}
|
||||||
|
BasicBotBase:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
|
||||||
properties:
|
properties:
|
||||||
user_id:
|
user_id:
|
||||||
type: integer
|
type: integer
|
||||||
|
@ -8832,10 +9034,20 @@ components:
|
||||||
$ref: "#/components/schemas/Config"
|
$ref: "#/components/schemas/Config"
|
||||||
Bot:
|
Bot:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/BasicBot"
|
- $ref: "#/components/schemas/BasicBotBase"
|
||||||
- description: |
|
- description: |
|
||||||
Object containing details of a bot.
|
Object containing details of a bot.
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
user_id: {}
|
||||||
|
full_name: {}
|
||||||
|
api_key: {}
|
||||||
|
default_sending_stream: {}
|
||||||
|
default_events_register_stream: {}
|
||||||
|
default_all_public_streams: {}
|
||||||
|
avatar_url: {}
|
||||||
|
owner_id: {}
|
||||||
|
services: {}
|
||||||
email:
|
email:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -9291,8 +9503,17 @@ components:
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/BasicStream"
|
$ref: "#/components/schemas/BasicStream"
|
||||||
EmojiReaction:
|
EmojiReaction:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/EmojiReactionBase"
|
||||||
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
emoji_code: {}
|
||||||
|
emoji_name: {}
|
||||||
|
reaction_type: {}
|
||||||
|
user_id: {}
|
||||||
|
user: {}
|
||||||
|
EmojiReactionBase:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
|
||||||
properties:
|
properties:
|
||||||
emoji_code:
|
emoji_code:
|
||||||
type: string
|
type: string
|
||||||
|
@ -9354,10 +9575,33 @@ components:
|
||||||
description: |
|
description: |
|
||||||
Whether the user is a mirror dummy.
|
Whether the user is a mirror dummy.
|
||||||
Messages:
|
Messages:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/MessagesBase"
|
||||||
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
avatar_url: {}
|
||||||
|
client: {}
|
||||||
|
content: {}
|
||||||
|
content_type: {}
|
||||||
|
display_recipient: {}
|
||||||
|
id: {}
|
||||||
|
is_me_message: {}
|
||||||
|
reactions: {}
|
||||||
|
recipient_id: {}
|
||||||
|
sender_email: {}
|
||||||
|
sender_full_name: {}
|
||||||
|
sender_id: {}
|
||||||
|
sender_realm_str: {}
|
||||||
|
stream_id: {}
|
||||||
|
subject: {}
|
||||||
|
topic_links: {}
|
||||||
|
submessages: {}
|
||||||
|
timestamp: {}
|
||||||
|
type: {}
|
||||||
|
MessagesBase:
|
||||||
type: object
|
type: object
|
||||||
description: |
|
description: |
|
||||||
Object containing details of the message.
|
Object containing details of the message.
|
||||||
additionalProperties: false
|
|
||||||
properties:
|
properties:
|
||||||
avatar_url:
|
avatar_url:
|
||||||
type: string
|
type: string
|
||||||
|
@ -9492,8 +9736,28 @@ components:
|
||||||
The type of the message: `stream` or `private`.
|
The type of the message: `stream` or `private`.
|
||||||
GetMessages:
|
GetMessages:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/Messages"
|
- $ref: "#/components/schemas/MessagesBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
avatar_url: {}
|
||||||
|
client: {}
|
||||||
|
content: {}
|
||||||
|
content_type: {}
|
||||||
|
display_recipient: {}
|
||||||
|
id: {}
|
||||||
|
is_me_message: {}
|
||||||
|
reactions: {}
|
||||||
|
recipient_id: {}
|
||||||
|
sender_email: {}
|
||||||
|
sender_full_name: {}
|
||||||
|
sender_id: {}
|
||||||
|
sender_realm_str: {}
|
||||||
|
stream_id: {}
|
||||||
|
subject: {}
|
||||||
|
topic_links: {}
|
||||||
|
submessages: {}
|
||||||
|
timestamp: {}
|
||||||
|
type: {}
|
||||||
flags:
|
flags:
|
||||||
type: array
|
type: array
|
||||||
description: |
|
description: |
|
||||||
|
@ -9550,8 +9814,28 @@ components:
|
||||||
Whether the client is capable of showing mobile/push notifications
|
Whether the client is capable of showing mobile/push notifications
|
||||||
to the user.
|
to the user.
|
||||||
User:
|
User:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/UserBase"
|
||||||
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
email: {}
|
||||||
|
is_bot: {}
|
||||||
|
avatar_url: {}
|
||||||
|
avatar_version: {}
|
||||||
|
full_name: {}
|
||||||
|
is_admin: {}
|
||||||
|
is_owner: {}
|
||||||
|
bot_type: {}
|
||||||
|
user_id: {}
|
||||||
|
bot_owner_id: {}
|
||||||
|
is_active: {}
|
||||||
|
is_guest: {}
|
||||||
|
timezone: {}
|
||||||
|
date_joined: {}
|
||||||
|
delivery_email: {}
|
||||||
|
profile_data: {}
|
||||||
|
UserBase:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
|
||||||
description: |
|
description: |
|
||||||
A dictionary containing basic data on a given Zulip user.
|
A dictionary containing basic data on a given Zulip user.
|
||||||
properties:
|
properties:
|
||||||
|
@ -9674,15 +9958,21 @@ components:
|
||||||
This user-generated HTML content should be rendered
|
This user-generated HTML content should be rendered
|
||||||
using the same CSS and client-side security protections
|
using the same CSS and client-side security protections
|
||||||
as are used for message content.
|
as are used for message content.
|
||||||
JsonResponse:
|
JsonResponseBase:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
|
||||||
properties:
|
properties:
|
||||||
result:
|
result:
|
||||||
type: string
|
type: string
|
||||||
JsonSuccess:
|
JsonSuccess:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonResponse"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
|
JsonSuccessBase:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/JsonResponseBase"
|
||||||
- required:
|
- required:
|
||||||
- result
|
- result
|
||||||
- msg
|
- msg
|
||||||
|
@ -9695,7 +9985,14 @@ components:
|
||||||
- example: {"msg": "", "result": "success"}
|
- example: {"msg": "", "result": "success"}
|
||||||
JsonError:
|
JsonError:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonResponse"
|
- $ref: "#/components/schemas/JsonErrorBase"
|
||||||
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
|
JsonErrorBase:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/JsonResponseBase"
|
||||||
- required:
|
- required:
|
||||||
- result
|
- result
|
||||||
- msg
|
- msg
|
||||||
|
@ -9707,11 +10004,14 @@ components:
|
||||||
type: string
|
type: string
|
||||||
ApiKeyResponse:
|
ApiKeyResponse:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- required:
|
- required:
|
||||||
- api_key
|
- api_key
|
||||||
- email
|
- email
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
api_key:
|
api_key:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -9729,16 +10029,30 @@ components:
|
||||||
}
|
}
|
||||||
CodedError:
|
CodedError:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonError"
|
- $ref: "#/components/schemas/CodedErrorBase"
|
||||||
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
|
code: {}
|
||||||
|
CodedErrorBase:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/JsonErrorBase"
|
||||||
- properties:
|
- properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
code:
|
code:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
A string that identifies the error.
|
A string that identifies the error.
|
||||||
BadEventQueueIdError:
|
BadEventQueueIdError:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/CodedError"
|
- $ref: "#/components/schemas/CodedErrorBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
|
code: {}
|
||||||
queue_id:
|
queue_id:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -9752,8 +10066,11 @@ components:
|
||||||
}
|
}
|
||||||
InvalidMessageError:
|
InvalidMessageError:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
raw_content:
|
raw_content:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -9766,8 +10083,12 @@ components:
|
||||||
}
|
}
|
||||||
NonExistingStreamError:
|
NonExistingStreamError:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/CodedError"
|
- $ref: "#/components/schemas/CodedErrorBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
|
code: {}
|
||||||
stream:
|
stream:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -9781,8 +10102,11 @@ components:
|
||||||
}
|
}
|
||||||
AddSubscriptionsResponse:
|
AddSubscriptionsResponse:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/JsonSuccess"
|
- $ref: "#/components/schemas/JsonSuccessBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
subscribed:
|
subscribed:
|
||||||
type: object
|
type: object
|
||||||
description: |
|
description: |
|
||||||
|
@ -9822,8 +10146,12 @@ components:
|
||||||
- example: {"msg": "Invalid API key", "result": "error"}
|
- example: {"msg": "Invalid API key", "result": "error"}
|
||||||
MissingArgumentError:
|
MissingArgumentError:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/CodedError"
|
- $ref: "#/components/schemas/CodedErrorBase"
|
||||||
- properties:
|
- additionalProperties: false
|
||||||
|
properties:
|
||||||
|
result: {}
|
||||||
|
msg: {}
|
||||||
|
code: {}
|
||||||
var_name:
|
var_name:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
|
Loading…
Reference in New Issue