diff --git a/api/docs/docs.go b/api/docs/docs.go index adf4061..b2ba13a 100644 --- a/api/docs/docs.go +++ b/api/docs/docs.go @@ -877,12 +877,17 @@ const docTemplate = `{ } }, "securityDefinitions": { - "apiKey": { + "api_key": { "type": "apiKey", "name": "x-api-key", "in": "header" } }, + "security": [ + { + "api_key": [] + } + ], "x-google-backend": { "address": "REDACTED" }, diff --git a/api/docs/swagger.json b/api/docs/swagger.json index a7cf3f7..0bce603 100644 --- a/api/docs/swagger.json +++ b/api/docs/swagger.json @@ -873,12 +873,17 @@ } }, "securityDefinitions": { - "apiKey": { + "api_key": { "type": "apiKey", "name": "x-api-key", "in": "header" } }, + "security": [ + { + "api_key": [] + } + ], "x-google-backend": { "address": "REDACTED" }, diff --git a/api/docs/swagger.yaml b/api/docs/swagger.yaml index e7a2ada..fcccba5 100644 --- a/api/docs/swagger.yaml +++ b/api/docs/swagger.yaml @@ -582,8 +582,10 @@ paths: $ref: '#/definitions/schema.Section' schemes: - http +security: +- api_key: [] securityDefinitions: - apiKey: + api_key: in: header name: x-api-key type: apiKey diff --git a/api/server.go b/api/server.go index d987db1..7eb4b95 100644 --- a/api/server.go +++ b/api/server.go @@ -19,7 +19,8 @@ import ( // @x-google-backend {"address": "REDACTED"} // @x-google-endpoints [{"name": "nebula-api-2lntm5dxoflqn.apigateway.nebula-api-368223.cloud.goog", "allowCors": true}] // @x-google-management {"metrics": [{"name": "read-requests", "displayName": "Read Requests CUSTOM", "valueType": "INT64", "metricKind": "DELTA"}], "quota": {"limits": [{"name": "read-limit", "metric": "read-requests", "unit": "1/min/{project}", "values": {"STANDARD": 1000}}]}} -// @securitydefinitions.apikey apiKey +// @security api_key +// @securitydefinitions.apikey api_key // @name x-api-key // @in header func main() {