Cloud Endpointのバージョン管理機能(つまりgcloud service-management deploy openapi_v1.yaml openapi_v2.yaml
)を使用して2つのバージョンのopenapi.yamlファイルをGoogle Cloud Endpointに導入しました。 yamlファイルの各バージョンには、バージョン番号と、別のものと異なる基本パス、api-key認証を使用する1つのエンドポイント、api-key認証タグの定義が含まれています。エンドポイントにデプロイした後、設定では両方のyamlファイルが表示されますが、この設定を使用してGAEにapiをデプロイすると、新しいバージョンのAPIキー認証のみが有効になります。複数のバージョンをGoogle Clouldエンドポイントで同じ設定に展開する際に、すべてのバージョンでapi-key authを有効にする方法
これは既知のバグか、すべてのバージョンの認証を有効にするために何か必要なことは誰にも分かりますか?
.yamlファイルは次のようになります。
swagger: "2.0"
info:
description: "This API is used to connect 3rd-party ids to a common user identity"
version: "0.0.1"
title: "****"
host: "uie-dot-user-id-exchange.appspot.com"
basePath: "/v0"
...
- "https"
x-google-allow: all
paths:
...
/ids/search:
get:
operationId: "id_search"
produces:
- "application/json"
security:
- api_key: []
tags:
- "Ids"
summary: "Privileged endpoint. Provide any id (3rd party or otherwise) and get a hash of all ids associated with it."
parameters:
- in: "query"
name: "id_type"
description: "Type of id to search"
required: true
type: string
- in: "query"
name: "id_value"
description: "Value of id to search"
required: true
type: string
responses:
200:
description: "AssociatedIdsHash"
schema:
$ref: '#/definitions/AssociatedIdsHash'
400:
description: "Bad request. Requires both id_type and id_value query parameters."
401:
description: "Unauthorized. Please provide a valid api-key in the \"api-key\" header."
404:
description: "Not found - no entry found for key provided"
...
################ SECURITY DEFINITIONS ################
securityDefinitions:
# This section configures basic authentication with an API key.
api_key:
type: "apiKey"
name: "key"
in: "query"
yamlファイルを投稿できますか? –