openapi: Rectify wrong examples and schemas.

Some examples mentioned in zulip.yaml did not match their schema.
Change either the schema or the example so that all examples are
valid with respect to their schemas.
This commit is contained in:
orientor
2020-05-11 17:44:12 +05:30
committed by Tim Abbott
parent 35139ac559
commit fab2ec9e63

View File

@@ -589,9 +589,13 @@ paths:
containing string email addresses. containing string email addresses.
**Changes**: Support for using user/stream IDs was added in Zulip 2.0.0. **Changes**: Support for using user/stream IDs was added in Zulip 2.0.0.
schema: content:
type: string application/json:
example: [9, 10] schema:
type: array
items:
type: integer
example: [9, 10]
required: true required: true
- $ref: '#/components/parameters/Topic' - $ref: '#/components/parameters/Topic'
- $ref: '#/components/parameters/Content' - $ref: '#/components/parameters/Content'
@@ -1282,8 +1286,6 @@ paths:
"is_active": true, "is_active": true,
"email": "hamlet@zulip.com" "email": "hamlet@zulip.com"
} }
} }
patch: patch:
@@ -1302,10 +1304,11 @@ paths:
in: query in: query
description: | description: |
The user's full name. The user's full name.
schema: content:
type: string application/json:
format: json schema:
example: NewName type: string
example: NewName
required: false required: false
- name: is_admin - name: is_admin
in: query in: query
@@ -2616,10 +2619,11 @@ paths:
in: query in: query
description: | description: |
Notification sound name. Notification sound name.
schema: content:
type: string application/json:
format: json schema:
example: ding type: string
example: ding
- name: enable_desktop_notifications - name: enable_desktop_notifications
in: query in: query
description: | description: |
@@ -2967,19 +2971,21 @@ paths:
in: query in: query
description: | description: |
The new description for the stream. The new description for the stream.
schema: content:
type: string application/json:
format: json schema:
example: "This stream is related to football dicsussions." type: string
example: This stream is related to football dicsussions.
required: false required: false
- name: new_name - name: new_name
in: query in: query
description: | description: |
The new name for the stream. The new name for the stream.
schema: content:
type: string application/json:
format: json schema:
example: "Italy" type: string
example: Italy
required: false required: false
- name: is_private - name: is_private
in: query in: query
@@ -3260,7 +3266,7 @@ paths:
parameters: parameters:
- $ref: '#/components/parameters/Narrow' - $ref: '#/components/parameters/Narrow'
- $ref: '#/components/parameters/Event_types' - $ref: '#/components/parameters/Event_types'
example: event_types=['message'] example: ['message']
security: security:
- basicAuth: [] - basicAuth: []
responses: responses: