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,8 +589,12 @@ 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.
content:
application/json:
schema: schema:
type: string type: array
items:
type: integer
example: [9, 10] example: [9, 10]
required: true required: true
- $ref: '#/components/parameters/Topic' - $ref: '#/components/parameters/Topic'
@@ -1282,8 +1286,6 @@ paths:
"is_active": true, "is_active": true,
"email": "hamlet@zulip.com" "email": "hamlet@zulip.com"
} }
} }
patch: patch:
@@ -1302,9 +1304,10 @@ paths:
in: query in: query
description: | description: |
The user's full name. The user's full name.
content:
application/json:
schema: schema:
type: string type: string
format: json
example: NewName example: NewName
required: false required: false
- name: is_admin - name: is_admin
@@ -2616,9 +2619,10 @@ paths:
in: query in: query
description: | description: |
Notification sound name. Notification sound name.
content:
application/json:
schema: schema:
type: string type: string
format: json
example: ding example: ding
- name: enable_desktop_notifications - name: enable_desktop_notifications
in: query in: query
@@ -2967,19 +2971,21 @@ paths:
in: query in: query
description: | description: |
The new description for the stream. The new description for the stream.
content:
application/json:
schema: schema:
type: string type: string
format: json example: This stream is related to football dicsussions.
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.
content:
application/json:
schema: schema:
type: string type: string
format: json example: Italy
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: