Allow null
in room_types
for POST /publicRooms
endpoints (#1564)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
adff3faa35
commit
49957be1e3
5 changed files with 18 additions and 3 deletions
|
@ -0,0 +1 @@
|
|||
Allow `null` in `room_types` in `POST /publicRooms` endpoints schemas.
|
|
@ -0,0 +1 @@
|
|||
Allow `null` in `room_types` in `POST /publicRooms` endpoints schemas.
|
|
@ -214,7 +214,7 @@ paths:
|
|||
type: array
|
||||
x-addedInMatrixVersion: "1.4"
|
||||
items:
|
||||
type: string
|
||||
type: ["string", "null"]
|
||||
description: |-
|
||||
An optional list of [room types](/client-server-api/#types) to search
|
||||
for. To include rooms without a room type, specify `null` within this
|
||||
|
|
|
@ -107,7 +107,7 @@ paths:
|
|||
type: array
|
||||
x-addedInMatrixVersion: "1.4"
|
||||
items:
|
||||
type: string
|
||||
type: ["string", "null"]
|
||||
description: |-
|
||||
An optional list of [room types](/client-server-api/#types) to search
|
||||
for. To include rooms without a room type, specify `null` within this
|
||||
|
|
|
@ -102,11 +102,24 @@
|
|||
internal structure, handle this with a bit of recursion
|
||||
*/}}
|
||||
{{ $type = delimit (slice "{string: " (partial "type-or-title" .additionalProperties) "}" ) "" }}
|
||||
{{ else if and .oneOf (reflect.IsSlice .oneOf) }}
|
||||
{{ else if reflect.IsSlice .type }}
|
||||
{{/* It's legal to specify an array of types. Join them together in that case */}}
|
||||
|
||||
{{ $types := slice }}
|
||||
|
||||
{{ range .type }}
|
||||
{{ $types = $types | append . }}
|
||||
{{ end }}
|
||||
|
||||
{{ $type = delimit $types "|" }}
|
||||
{{ else if and .oneOf (reflect.IsSlice .oneOf) }}
|
||||
{{/*
|
||||
This is like an array of types except some of the types probably have a schema.
|
||||
Join them together too.
|
||||
*/}}
|
||||
|
||||
{{ $types := slice }}
|
||||
|
||||
{{ range .oneOf }}
|
||||
{{ $types = $types | append .type }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue