1
これは、私は現在、私の闊歩ファイル内に持っているものです。API Gatewayを介してパス変数を渡す方法
"/v1/user/{username}": {
"get": {
"consumes": ["application/json"],
"produces": ["application/json"],
"parameters": [{
"name": "username",
"in": "path",
"description": "Username of user",
"required": true,
"type": "string"
}],
"responses": {
"200": {
"description": "user retrieved",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/User"
}
}
}
},
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "http://useroregon.recopspipeline.com/v1/user/{username}",
"httpMethod": "GET",
"responses": {
"default": {
"statusCode": "200",
"responseTemplates": {
"application/json": "$input.json('$.body')"
}
}
}
}
},
しかし、私のバックエンドは、単にパス変数として「{ユーザー名}」を受信します。
誰もパス変数を送信する方法を知っていますか?
swagger jsonファイルやGUIを使って行う方法に関するヒントは素晴らしいでしょう!