allow disabling JWT in HTTP query parameters (#4518)

This commit is contained in:
Alessandro Ros
2025-05-11 10:21:08 +02:00
committed by GitHub
parent c17a6de2a6
commit 74bfb988d7
11 changed files with 58 additions and 15 deletions

View File

@@ -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)
}
}
}