mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-20 16:38:37 +01:00
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
|
|
@ -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
|
type: array
|
||||||
x-addedInMatrixVersion: "1.4"
|
x-addedInMatrixVersion: "1.4"
|
||||||
items:
|
items:
|
||||||
type: string
|
type: ["string", "null"]
|
||||||
description: |-
|
description: |-
|
||||||
An optional list of [room types](/client-server-api/#types) to search
|
An optional list of [room types](/client-server-api/#types) to search
|
||||||
for. To include rooms without a room type, specify `null` within this
|
for. To include rooms without a room type, specify `null` within this
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
x-addedInMatrixVersion: "1.4"
|
x-addedInMatrixVersion: "1.4"
|
||||||
items:
|
items:
|
||||||
type: string
|
type: ["string", "null"]
|
||||||
description: |-
|
description: |-
|
||||||
An optional list of [room types](/client-server-api/#types) to search
|
An optional list of [room types](/client-server-api/#types) to search
|
||||||
for. To include rooms without a room type, specify `null` within this
|
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
|
internal structure, handle this with a bit of recursion
|
||||||
*/}}
|
*/}}
|
||||||
{{ $type = delimit (slice "{string: " (partial "type-or-title" .additionalProperties) "}" ) "" }}
|
{{ $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 */}}
|
{{/* It's legal to specify an array of types. Join them together in that case */}}
|
||||||
|
|
||||||
{{ $types := slice }}
|
{{ $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 }}
|
{{ range .oneOf }}
|
||||||
{{ $types = $types | append .type }}
|
{{ $types = $types | append .type }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue