mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
fix(swagger): fix swagger authorization header
This commit is contained in:
@@ -46,13 +46,11 @@ import (
|
||||
// @host localhost:8080
|
||||
// @BasePath /
|
||||
|
||||
// @securityDefinitions.apikey AdminAuth
|
||||
// @in header
|
||||
// @name Authorization
|
||||
// @securityDefinitions.bearer AdminAuth
|
||||
// @description Admin token for management API access
|
||||
|
||||
// @securityDefinitions.apikey MasterAuth
|
||||
// @in header
|
||||
// @name Authorization
|
||||
// @securityDefinitions.bearer MasterAuth
|
||||
// @description Master key for tenant API access
|
||||
|
||||
func fatal(logger *slog.Logger, msg string, args ...any) {
|
||||
logger.Error(msg, args...)
|
||||
|
||||
14
docs/docs.go
14
docs/docs.go
@@ -4714,18 +4714,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"AdminAuth": {
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
},
|
||||
"MasterAuth": {
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
@@ -4736,7 +4724,7 @@ var SwaggerInfo = &swag.Spec{
|
||||
BasePath: "/",
|
||||
Schemes: []string{},
|
||||
Title: "EZ-API Control Plane",
|
||||
Description: "Management API for EZ-API Gateway system.",
|
||||
Description: "Master key for tenant API access",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
LeftDelim: "{{",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "Management API for EZ-API Gateway system.",
|
||||
"description": "Master key for tenant API access",
|
||||
"title": "EZ-API Control Plane",
|
||||
"termsOfService": "http://swagger.io/terms/",
|
||||
"contact": {
|
||||
@@ -4708,17 +4708,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"AdminAuth": {
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
},
|
||||
"MasterAuth": {
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -798,7 +798,7 @@ info:
|
||||
email: support@swagger.io
|
||||
name: API Support
|
||||
url: http://www.swagger.io/support
|
||||
description: Management API for EZ-API Gateway system.
|
||||
description: Master key for tenant API access
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
@@ -3025,13 +3025,4 @@ paths:
|
||||
summary: Update child key
|
||||
tags:
|
||||
- master
|
||||
securityDefinitions:
|
||||
AdminAuth:
|
||||
in: header
|
||||
name: Authorization
|
||||
type: apiKey
|
||||
MasterAuth:
|
||||
in: header
|
||||
name: Authorization
|
||||
type: apiKey
|
||||
swagger: "2.0"
|
||||
|
||||
Reference in New Issue
Block a user