mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
allow disabling JWT in HTTP query parameters (#4518)
This commit is contained in:
parent
c17a6de2a6
commit
74bfb988d7
11 changed files with 58 additions and 15 deletions
|
|
@ -14,9 +14,10 @@ import (
|
|||
)
|
||||
|
||||
type openAPIProperty struct {
|
||||
Ref string `json:"$ref"`
|
||||
Type string `json:"type"`
|
||||
Nullable bool `json:"nullable"`
|
||||
Ref string `json:"$ref"`
|
||||
Type string `json:"type"`
|
||||
Nullable bool `json:"nullable"`
|
||||
Items *openAPIProperty `json:"items"`
|
||||
}
|
||||
|
||||
type openAPISchema struct {
|
||||
|
|
@ -170,9 +171,19 @@ func TestAPIDocs(t *testing.T) {
|
|||
Nullable: true,
|
||||
}
|
||||
|
||||
case sf.Type == reflect.TypeOf(conf.AuthInternalUserPermissions{}):
|
||||
content2.Properties[js] = openAPIProperty{
|
||||
Type: "array",
|
||||
Items: &openAPIProperty{
|
||||
Ref: "#/components/schemas/AuthInternalUserPermission",
|
||||
},
|
||||
}
|
||||
|
||||
default:
|
||||
if existing, ok := content1.Properties[js]; ok {
|
||||
content2.Properties[js] = existing
|
||||
} else {
|
||||
t.Errorf("missing item: '%s'", js)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue