# [START securityDef] securityDefinitions: # This section configures basic authentication with an API key. api_key: type: "apiKey" name: "X-API-KEY" in: "query" # [END securityDef]

问题描述 投票:0回答:1
并且在路径下增加了安全性:

"/api/getProduct": get: description: "Get product data." operationId: "getProduct" produces: - "application/json" responses: 200: description: "getProduct" schema: $ref: "#/definitions/echoMessage" security: - api_key: []

此后,当我部署端点时,收到消息,如下图所示:

enter image description here

现在,我不知道下一步该怎么做?

[请任何人都可以帮助我。预先感谢。

我使用Node.js创建了开放式API,并在Google云端点上进行了部署,并且还尝试通过使用API​​密钥来实现对此API的保护。然后,我创建了openapi.yaml文件,在...

google-cloud-platform google-cloud-endpoints api-key
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.