Make sure examples types match schema in definitions (#1563)

* Make sure examples types match schema in definitions

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelogs

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add double quotes around URL

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
pull/1596/head
Kévin Commaille 1 year ago committed by GitHub
parent 6521411547
commit bed9223610
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1 @@
Make sure examples types match schema in definitions.

@ -0,0 +1 @@
Make sure examples types match schema in definitions.

@ -0,0 +1 @@
Make sure examples types match schema in definitions.

@ -84,7 +84,7 @@ paths:
- in: query - in: query
name: limit name: limit
description: "The maximum number of events to return. Default: 10." description: "The maximum number of events to return. Default: 10."
example: "3" example: 3
schema: schema:
type: integer type: integer
- in: query - in: query

@ -44,7 +44,7 @@ paths:
name: timeout name: timeout
description: The maximum time in milliseconds to wait for an event. description: The maximum time in milliseconds to wait for an event.
required: false required: false
example: "35000" example: 35000
schema: schema:
type: integer type: integer
responses: responses:
@ -105,7 +105,7 @@ paths:
name: limit name: limit
description: The maximum number of messages to return for each room. description: The maximum number of messages to return for each room.
required: false required: false
example: "2" example: 2
schema: schema:
type: integer type: integer
- in: query - in: query
@ -116,7 +116,7 @@ paths:
included. If set to `true` then rooms that the user has left are included. If set to `true` then rooms that the user has left are
included as well. By default this is `false`. included as well. By default this is `false`.
required: false required: false
example: "true" example: true
schema: schema:
type: boolean type: boolean
responses: responses:

@ -49,14 +49,13 @@ paths:
name: timeout name: timeout
description: The maximum time in milliseconds to wait for an event. description: The maximum time in milliseconds to wait for an event.
required: false required: false
example: "35000" example: 35000
schema: schema:
type: integer type: integer
- in: query - in: query
name: room_id name: room_id
description: The room ID for which events should be returned. description: The room ID for which events should be returned.
example: example: "!somewhere:over.the.rainbow"
- "!somewhere:over.the.rainbow"
schema: schema:
type: string type: string
responses: responses:

@ -543,7 +543,7 @@ paths:
required: true required: true
description: | description: |
The kind of rule The kind of rule
example: cake example: content
schema: schema:
type: string type: string
enum: enum:

@ -84,7 +84,7 @@ paths:
changed since the point indicated by `since` will be returned. changed since the point indicated by `since` will be returned.
By default, this is `false`. By default, this is `false`.
example: "false" example: false
schema: schema:
type: boolean type: boolean
- in: query - in: query

@ -29,7 +29,7 @@ paths:
name: sid name: sid
description: The Session ID generated by the `requestToken` call. description: The Session ID generated by the `requestToken` call.
required: true required: true
example: 1234 example: "1234"
schema: schema:
type: string type: string
- in: query - in: query

@ -186,7 +186,7 @@ paths:
name: sid name: sid
required: true required: true
description: The session ID, generated by the `requestToken` call. description: The session ID, generated by the `requestToken` call.
example: 1234 example: "1234"
schema: schema:
type: string type: string
- in: query - in: query

@ -188,7 +188,7 @@ paths:
name: sid name: sid
required: true required: true
description: The session ID, generated by the `requestToken` call. description: The session ID, generated by the `requestToken` call.
example: 1234 example: "1234"
schema: schema:
type: string type: string
- in: query - in: query

@ -131,7 +131,7 @@ paths:
items: items:
type: string type: string
description: The URLs the user is accepting in this request. description: The URLs the user is accepting in this request.
example: https://example.org/somewhere/terms-2.0-en.html example: ["https://example.org/somewhere/terms-2.0-en.html"]
required: required:
- user_accepts - user_accepts
responses: responses:

@ -109,7 +109,6 @@ paths:
- depth - depth
- content - content
example: { example: {
"room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@someone:example.org", "state_key": "@someone:example.org",
"origin": "example.org", "origin": "example.org",
@ -117,7 +116,8 @@ paths:
"sender": "@someone:example.org", "sender": "@someone:example.org",
"content": { "content": {
"membership": "leave" "membership": "leave"
} },
"depth": 0
} }
required: true required: true
responses: responses:

Loading…
Cancel
Save