Skip to content

Commit

Permalink
Make sure examples types match schema in definitions (matrix-org#1563)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
zecakeh authored Jul 4, 2023
1 parent 6521411 commit bed9223
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 15 deletions.
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/1563.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make sure examples types match schema in definitions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make sure examples types match schema in definitions.
1 change: 1 addition & 0 deletions changelogs/server_server/newsfragments/1563.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make sure examples types match schema in definitions.
2 changes: 1 addition & 1 deletion data/api/client-server/message_pagination.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ paths:
- in: query
name: limit
description: "The maximum number of events to return. Default: 10."
example: "3"
example: 3
schema:
type: integer
- in: query
Expand Down
6 changes: 3 additions & 3 deletions data/api/client-server/old_sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ paths:
name: timeout
description: The maximum time in milliseconds to wait for an event.
required: false
example: "35000"
example: 35000
schema:
type: integer
responses:
Expand Down Expand Up @@ -105,7 +105,7 @@ paths:
name: limit
description: The maximum number of messages to return for each room.
required: false
example: "2"
example: 2
schema:
type: integer
- in: query
Expand All @@ -116,7 +116,7 @@ paths:
included. If set to `true` then rooms that the user has left are
included as well. By default this is `false`.
required: false
example: "true"
example: true
schema:
type: boolean
responses:
Expand Down
5 changes: 2 additions & 3 deletions data/api/client-server/peeking_events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,13 @@ paths:
name: timeout
description: The maximum time in milliseconds to wait for an event.
required: false
example: "35000"
example: 35000
schema:
type: integer
- in: query
name: room_id
description: The room ID for which events should be returned.
example:
- "!somewhere:over.the.rainbow"
example: "!somewhere:over.the.rainbow"
schema:
type: string
responses:
Expand Down
2 changes: 1 addition & 1 deletion data/api/client-server/pushrules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ paths:
required: true
description: |
The kind of rule
example: cake
example: content
schema:
type: string
enum:
Expand Down
2 changes: 1 addition & 1 deletion data/api/client-server/sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ paths:
changed since the point indicated by `since` will be returned.
By default, this is `false`.
example: "false"
example: false
schema:
type: boolean
- in: query
Expand Down
2 changes: 1 addition & 1 deletion data/api/identity/v2_associations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ paths:
name: sid
description: The Session ID generated by the `requestToken` call.
required: true
example: 1234
example: "1234"
schema:
type: string
- in: query
Expand Down
2 changes: 1 addition & 1 deletion data/api/identity/v2_email_associations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ paths:
name: sid
required: true
description: The session ID, generated by the `requestToken` call.
example: 1234
example: "1234"
schema:
type: string
- in: query
Expand Down
2 changes: 1 addition & 1 deletion data/api/identity/v2_phone_associations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ paths:
name: sid
required: true
description: The session ID, generated by the `requestToken` call.
example: 1234
example: "1234"
schema:
type: string
- in: query
Expand Down
2 changes: 1 addition & 1 deletion data/api/identity/v2_terms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ paths:
items:
type: string
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:
- user_accepts
responses:
Expand Down
4 changes: 2 additions & 2 deletions data/api/server-server/leaving-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ paths:
- depth
- content
example: {
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"content": {
"membership": "leave"
}
},
"depth": 0
}
required: true
responses:
Expand Down

0 comments on commit bed9223

Please sign in to comment.