{"action":"created","issue":{"url":"https://api.github.com/repos/awslabs/aws-apigateway-importer/issues/104","labels_url":"https://api.github.com/repos/awslabs/aws-apigateway-importer/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/awslabs/aws-apigateway-importer/issues/104/comments","events_url":"https://api.github.com/repos/awslabs/aws-apigateway-importer/issues/104/events","html_url":"https://github.com/awslabs/aws-apigateway-importer/issues/104","id":119798798,"number":104,"title":"Import failing due to ResponseParameter mapping","user":{"login":"pcutz","id":4490563,"avatar_url":"https://avatars.githubusercontent.com/u/4490563?v=3","gravatar_id":"","url":"https://api.github.com/users/pcutz","html_url":"https://github.com/pcutz","followers_url":"https://api.github.com/users/pcutz/followers","following_url":"https://api.github.com/users/pcutz/following{/other_user}","gists_url":"https://api.github.com/users/pcutz/gists{/gist_id}","starred_url":"https://api.github.com/users/pcutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcutz/subscriptions","organizations_url":"https://api.github.com/users/pcutz/orgs","repos_url":"https://api.github.com/users/pcutz/repos","events_url":"https://api.github.com/users/pcutz/events{/privacy}","received_events_url":"https://api.github.com/users/pcutz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-01T20:17:12Z","updated_at":"2015-12-01T21:41:19Z","closed_at":null,"body":"Hello,\r\n\r\nI'm trying to do API gateway mapping of response headers, however I get the following error:\r\n\r\n```\r\n2015-12-01 15:07:20,168 INFO - Creating integration with type HTTP\r\n2015-12-01 15:07:20,314 ERROR - Error creating API, rolling back\r\ncom.amazonaws.services.apigateway.model.BadRequestException: Invalid mapping expression specified: Validation Result: warnings : [], errors : [Invalid mapping identifier specified] (Service: null; Status Code: 400; Error Code: null; Request ID: 3a7afc56-9867-11e5-a6b6-0b5edfa99d75)\r\n\tat com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1249)\r\n\tat com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:870)\r\n\tat com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:574)\r\n\tat com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:362)\r\n\tat com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:328)\r\n\tat com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:307)\r\n\tat com.amazonaws.hal.client.HalClient.invoke(HalClient.java:235)\r\n\tat com.amazonaws.hal.client.HalClient.putResource(HalClient.java:122)\r\n\tat com.amazonaws.hal.client.HalResourceInvocationHandler.invoke(HalResourceInvocationHandler.java:125)\r\n\tat com.sun.proxy.$Proxy37.putIntegrationResponse(Unknown Source)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.lambda$createIntegrationResponses$6(ApiGatewaySdkSwaggerApiImporter.java:279)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter$$Lambda$14/15364204.accept(Unknown Source)\r\n\tat java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:663)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createIntegrationResponses(ApiGatewaySdkSwaggerApiImporter.java:268)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createIntegration(ApiGatewaySdkSwaggerApiImporter.java:261)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createMethod(ApiGatewaySdkSwaggerApiImporter.java:234)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.lambda$createMethods$3(ApiGatewaySdkSwaggerApiImporter.java:173)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter$$Lambda$6/9903979.accept(Unknown Source)\r\n\tat java.util.HashMap$EntrySet.forEach(HashMap.java:1035)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createMethods(ApiGatewaySdkSwaggerApiImporter.java:172)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createResources(ApiGatewaySdkSwaggerApiImporter.java:164)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createApi(ApiGatewaySdkSwaggerApiImporter.java:66)\r\n\tat com.amazonaws.service.apigateway.importer.impl.ApiGatewaySwaggerFileImporter.importApi(ApiGatewaySwaggerFileImporter.java:48)\r\n\tat com.amazonaws.service.apigateway.importer.ApiImporterMain.importSwagger(ApiImporterMain.java:154)\r\n\tat com.amazonaws.service.apigateway.importer.ApiImporterMain.execute(ApiImporterMain.java:144)\r\n\tat com.amazonaws.service.apigateway.importer.ApiImporterMain.main(ApiImporterMain.java:83)\r\n2015-12-01 15:07:20,314 INFO - Deleting API oy4uu5noxe\r\n2015-12-01 15:07:21,235 ERROR - Error importing API definition\r\ncom.amazonaws.services.apigateway.model.BadRequestException: Invalid mapping expression specified: Validation Result: warnings : [], errors : [Invalid mapping identifier specified] (Service: null; Status Code: 400; Error Code: null; Request ID: 3a7afc56-9867-11e5-a6b6-0b5edfa99d75)\r\n\tat com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1249)\r\n\tat com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:870)\r\n\tat com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:574)\r\n\tat com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:362)\r\n\tat com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:328)\r\n\tat com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:307)\r\n\tat com.amazonaws.hal.client.HalClient.invoke(HalClient.java:235)\r\n\tat com.amazonaws.hal.client.HalClient.putResource(HalClient.java:122)\r\n\tat com.amazonaws.hal.client.HalResourceInvocationHandler.invoke(HalResourceInvocationHandler.java:125)\r\n\tat com.sun.proxy.$Proxy37.putIntegrationResponse(Unknown Source)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.lambda$createIntegrationResponses$6(ApiGatewaySdkSwaggerApiImporter.java:279)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter$$Lambda$14/15364204.accept(Unknown Source)\r\n\tat java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:663)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createIntegrationResponses(ApiGatewaySdkSwaggerApiImporter.java:268)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createIntegration(ApiGatewaySdkSwaggerApiImporter.java:261)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createMethod(ApiGatewaySdkSwaggerApiImporter.java:234)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.lambda$createMethods$3(ApiGatewaySdkSwaggerApiImporter.java:173)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter$$Lambda$6/9903979.accept(Unknown Source)\r\n\tat java.util.HashMap$EntrySet.forEach(HashMap.java:1035)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createMethods(ApiGatewaySdkSwaggerApiImporter.java:172)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createResources(ApiGatewaySdkSwaggerApiImporter.java:164)\r\n\tat com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createApi(ApiGatewaySdkSwaggerApiImporter.java:66)\r\n\tat com.amazonaws.service.apigateway.importer.impl.ApiGatewaySwaggerFileImporter.importApi(ApiGatewaySwaggerFileImporter.java:48)\r\n\tat com.amazonaws.service.apigateway.importer.ApiImporterMain.importSwagger(ApiImporterMain.java:154)\r\n\tat com.amazonaws.service.apigateway.importer.ApiImporterMain.execute(ApiImporterMain.java:144)\r\n\tat com.amazonaws.service.apigateway.importer.ApiImporterMain.main(ApiImporterMain.java:83)\r\n```\r\n\r\nMy AWS integration is:\r\n\r\n``` json\r\n\"x-amazon-apigateway-integration\": {\r\n\t\"type\": \"http\",\r\n\t\"uri\": \"http://httpservice.com/jobs/{jobIdServlet}/requests/{requestIdServlet}/retrievefile\",\r\n\t\"httpMethod\": \"GET\",\r\n\t\"requestParameters\": {\r\n\t\t\"integration.request.path.jobIdServlet\": \"method.request.path.jobId\",\r\n\t\t\"integration.request.path.requestIdServlet\": \"method.request.path.requestId\",\r\n\t\t\"integration.request.header.Authorization\": \"method.request.header.Authorization\"\r\n\t},\r\n\t\"responses\": {\r\n\t\t\"default\": {\r\n\t\t\t\"statusCode\": \"200\",\r\n\t\t\t\"responseParameters\": {\r\n\t\t\t\t\"method.response.header.Content-Disposition\": \"integration.response.header.Content-Disposition\",\r\n\t\t\t\t\"method.response.header.Content-Type\": \"integration.response.header.Content-Type\"\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"4\\\\d{2}.*\": {\r\n\t\t\t\"statusCode\": \"400\"\r\n\t\t},\r\n\t\t\"5\\\\d{2}.*\": {\r\n\t\t\t\"statusCode\": \"500\"\r\n\t\t}\r\n\t}\r\n}\r\n\r\n```\r\n\r\nI also tried it using the response parameters listed in the README.md file, but the error is the same.\r\n\r\nfor example: \r\n\r\n```\r\n           \"responseParameters\" : {\r\n               \"method.response.header.test-method-response-header\" : \"'static value'\"\r\n           },\r\n```\r\n\r\nIs response parameter mapping currently supported by the API Gateway importer tool?\r\n\r\nThanks,\r\nPatrick"},"comment":{"url":"https://api.github.com/repos/awslabs/aws-apigateway-importer/issues/comments/161104322","html_url":"https://github.com/awslabs/aws-apigateway-importer/issues/104#issuecomment-161104322","issue_url":"https://api.github.com/repos/awslabs/aws-apigateway-importer/issues/104","id":161104322,"user":{"login":"rpgreen","id":1379412,"avatar_url":"https://avatars.githubusercontent.com/u/1379412?v=3","gravatar_id":"","url":"https://api.github.com/users/rpgreen","html_url":"https://github.com/rpgreen","followers_url":"https://api.github.com/users/rpgreen/followers","following_url":"https://api.github.com/users/rpgreen/following{/other_user}","gists_url":"https://api.github.com/users/rpgreen/gists{/gist_id}","starred_url":"https://api.github.com/users/rpgreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpgreen/subscriptions","organizations_url":"https://api.github.com/users/rpgreen/orgs","repos_url":"https://api.github.com/users/rpgreen/repos","events_url":"https://api.github.com/users/rpgreen/events{/privacy}","received_events_url":"https://api.github.com/users/rpgreen/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T21:41:19Z","updated_at":"2015-12-01T21:41:19Z","body":"It is supported. Are you able to get request parameters working? I'd\nrecommend adding things one at a time until you can identify the parameter\ncausing issues.\n\nOn Tuesday, 1 December 2015, pcutz <notifications@github.com> wrote:\n\n> Hello,\n>\n> I'm trying to do API gateway mapping of response headers, however I get\n> the following error:\n>\n> 2015-12-01 15:07:20,168 INFO - Creating integration with type HTTP\n> 2015-12-01 15:07:20,314 ERROR - Error creating API, rolling back\n> com.amazonaws.services.apigateway.model.BadRequestException: Invalid mapping expression specified: Validation Result: warnings : [], errors : [Invalid mapping identifier specified] (Service: null; Status Code: 400; Error Code: null; Request ID: 3a7afc56-9867-11e5-a6b6-0b5edfa99d75)\n>     at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1249)\n>     at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:870)\n>     at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:574)\n>     at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:362)\n>     at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:328)\n>     at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:307)\n>     at com.amazonaws.hal.client.HalClient.invoke(HalClient.java:235)\n>     at com.amazonaws.hal.client.HalClient.putResource(HalClient.java:122)\n>     at com.amazonaws.hal.client.HalResourceInvocationHandler.invoke(HalResourceInvocationHandler.java:125)\n>     at com.sun.proxy.$Proxy37.putIntegrationResponse(Unknown Source)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.lambda$createIntegrationResponses$6(ApiGatewaySdkSwaggerApiImporter.java:279)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter$$Lambda$14/15364204.accept(Unknown Source)\n>     at java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:663)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createIntegrationResponses(ApiGatewaySdkSwaggerApiImporter.java:268)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createIntegration(ApiGatewaySdkSwaggerApiImporter.java:261)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createMethod(ApiGatewaySdkSwaggerApiImporter.java:234)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.lambda$createMethods$3(ApiGatewaySdkSwaggerApiImporter.java:173)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter$$Lambda$6/9903979.accept(Unknown Source)\n>     at java.util.HashMap$EntrySet.forEach(HashMap.java:1035)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createMethods(ApiGatewaySdkSwaggerApiImporter.java:172)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createResources(ApiGatewaySdkSwaggerApiImporter.java:164)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createApi(ApiGatewaySdkSwaggerApiImporter.java:66)\n>     at com.amazonaws.service.apigateway.importer.impl.ApiGatewaySwaggerFileImporter.importApi(ApiGatewaySwaggerFileImporter.java:48)\n>     at com.amazonaws.service.apigateway.importer.ApiImporterMain.importSwagger(ApiImporterMain.java:154)\n>     at com.amazonaws.service.apigateway.importer.ApiImporterMain.execute(ApiImporterMain.java:144)\n>     at com.amazonaws.service.apigateway.importer.ApiImporterMain.main(ApiImporterMain.java:83)\n> 2015-12-01 15:07:20,314 INFO - Deleting API oy4uu5noxe\n> 2015-12-01 15:07:21,235 ERROR - Error importing API definition\n> com.amazonaws.services.apigateway.model.BadRequestException: Invalid mapping expression specified: Validation Result: warnings : [], errors : [Invalid mapping identifier specified] (Service: null; Status Code: 400; Error Code: null; Request ID: 3a7afc56-9867-11e5-a6b6-0b5edfa99d75)\n>     at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1249)\n>     at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:870)\n>     at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:574)\n>     at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:362)\n>     at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:328)\n>     at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:307)\n>     at com.amazonaws.hal.client.HalClient.invoke(HalClient.java:235)\n>     at com.amazonaws.hal.client.HalClient.putResource(HalClient.java:122)\n>     at com.amazonaws.hal.client.HalResourceInvocationHandler.invoke(HalResourceInvocationHandler.java:125)\n>     at com.sun.proxy.$Proxy37.putIntegrationResponse(Unknown Source)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.lambda$createIntegrationResponses$6(ApiGatewaySdkSwaggerApiImporter.java:279)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter$$Lambda$14/15364204.accept(Unknown Source)\n>     at java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:663)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createIntegrationResponses(ApiGatewaySdkSwaggerApiImporter.java:268)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createIntegration(ApiGatewaySdkSwaggerApiImporter.java:261)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createMethod(ApiGatewaySdkSwaggerApiImporter.java:234)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.lambda$createMethods$3(ApiGatewaySdkSwaggerApiImporter.java:173)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter$$Lambda$6/9903979.accept(Unknown Source)\n>     at java.util.HashMap$EntrySet.forEach(HashMap.java:1035)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createMethods(ApiGatewaySdkSwaggerApiImporter.java:172)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createResources(ApiGatewaySdkSwaggerApiImporter.java:164)\n>     at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createApi(ApiGatewaySdkSwaggerApiImporter.java:66)\n>     at com.amazonaws.service.apigateway.importer.impl.ApiGatewaySwaggerFileImporter.importApi(ApiGatewaySwaggerFileImporter.java:48)\n>     at com.amazonaws.service.apigateway.importer.ApiImporterMain.importSwagger(ApiImporterMain.java:154)\n>     at com.amazonaws.service.apigateway.importer.ApiImporterMain.execute(ApiImporterMain.java:144)\n>     at com.amazonaws.service.apigateway.importer.ApiImporterMain.main(ApiImporterMain.java:83)\n>\n> My AWS integration is:\n>\n> \"x-amazon-apigateway-integration\": {\n>     \"type\": \"http\",\n>     \"uri\": \"http://httpservice.com/jobs/{jobIdServlet}/requests/{requestIdServlet}/retrievefile\",\n>     \"httpMethod\": \"GET\",\n>     \"requestParameters\": {\n>         \"integration.request.path.jobIdServlet\": \"method.request.path.jobId\",\n>         \"integration.request.path.requestIdServlet\": \"method.request.path.requestId\",\n>         \"integration.request.header.Authorization\": \"method.request.header.Authorization\"\n>     },\n>     \"responses\": {\n>         \"default\": {\n>             \"statusCode\": \"200\",\n>             \"responseParameters\": {\n>                 \"method.response.header.Content-Disposition\": \"integration.response.header.Content-Disposition\",\n>                 \"method.response.header.Content-Type\": \"integration.response.header.Content-Type\"\n>             }\n>         },\n>         \"4\\\\d{2}.*\": {\n>             \"statusCode\": \"400\"\n>         },\n>         \"5\\\\d{2}.*\": {\n>             \"statusCode\": \"500\"\n>         }\n>     }\n> }\n>\n> I also tried it using the response parameters listed in the README.md\n> file, but the error is the same.\n>\n> for example:\n>\n>            \"responseParameters\" : {\n>                \"method.response.header.test-method-response-header\" : \"'static value'\"\n>            },\n>\n> Is response parameter mapping currently supported by the API Gateway\n> importer tool?\n>\n> Thanks,\n> Patrick\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/awslabs/aws-apigateway-importer/issues/104>.\n>\n\n\n--\n"}}