Giter Club home page Giter Club logo

Comments (6)

wbornor avatar wbornor commented on September 24, 2024

Also noticing this sporadically. I simplified my swagger definition down to one resource. It imports, then doesn't for a few iterations before importing successfully again.

2015-10-16 17:22:34,230 INFO - Creating method response for api qr2jfn4164 and method GET and status 400
2015-10-16 17:22:34,353 INFO - Creating method response for api qr2jfn4164 and method GET and status 404
2015-10-16 17:22:34,486 INFO - Creating method response for api qr2jfn4164 and method GET and status 500
2015-10-16 17:22:34,664 INFO - integ: {type=aws, uri=arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:070913506331:function:wca-codecook-int-get-barcode/invocations, httpMethod=POST, credentials=arn:aws:iam::070913506331:role/westest_apigateway_lambda, requestTemplates={application/json="$input.params('barcode')"}, requestParameters={integration.request.path.barcode=method.request.path.barcode}, responses={400.*={statusCode=400, responseTemplates={application/json=}}, 404.*={statusCode=404, responseTemplates={application/json={}}}, 5//d{2}.*={statusCode=500, responseTemplates={application/json=}}, default={statusCode=200}}}
2015-10-16 17:22:34,665 INFO - Creating integration with type AWS
2015-10-16 17:22:34,759 ERROR - integ: {type=aws, uri=arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:070913506331:function:wca-codecook-int-get-barcode/invocations, httpMethod=POST, credentials=arn:aws:iam::070913506331:role/westest_apigateway_lambda, requestTemplates={application/json="$input.params('barcode')"}, requestParameters={integration.request.path.barcode=method.request.path.barcode}, responses={400.*={statusCode=400, responseTemplates={application/json=}}, 404.*={statusCode=404, responseTemplates={application/json={}}}, 5//d{2}.*={statusCode=500, responseTemplates={application/json=}}, default={statusCode=200}}}
2015-10-16 17:22:34,760 ERROR - integration: null
2015-10-16 17:22:34,760 ERROR - input: {type: AWS,httpMethod: POST,uri: arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:070913506331:function:wca-codecook-int-get-barcode/invocations,credentials: arn:aws:iam::070913506331:role/westest_apigateway_lambda,requestParameters: {integration.request.path.barcode=method.request.path.barcode},requestTemplates: {application/json="$input.params('barcode')"},}
2015-10-16 17:22:34,761 ERROR - Error importing API definition
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: 0491d29b-744c-11e5-91eb-2b89a6ae3421)
    at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1181)
    at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:766)
    at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:485)
    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:306)
    at com.amazonaws.hal.client.HalClient.invoke(HalClient.java:235)
    at com.amazonaws.hal.client.HalClient.putResource(HalClient.java:122)
    at com.amazonaws.hal.client.HalResourceInvocationHandler.invoke(HalResourceInvocationHandler.java:125)
    at com.sun.proxy.$Proxy39.putIntegration(Unknown Source)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createIntegration(ApiGatewaySdkSwaggerApiImporter.java:256)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.updateMethod(ApiGatewaySdkSwaggerApiImporter.java:417)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.updateMethods(ApiGatewaySdkSwaggerApiImporter.java:133)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.updateApi(ApiGatewaySdkSwaggerApiImporter.java:83)
    at com.amazonaws.service.apigateway.importer.impl.ApiGatewaySwaggerFileImporter.updateApi(ApiGatewaySwaggerFileImporter.java:58)
    at com.amazonaws.service.apigateway.importer.ApiImporterMain.execute(ApiImporterMain.java:143)
    at com.amazonaws.service.apigateway.importer.ApiImporterMain.main(ApiImporterMain.java:74)
    at com.amazonaws.service.apigateway.importer.ApiImporterMainTest.test(ApiImporterMainTest.java:22)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at coDisconnected from the target VM, address: '127.0.0.1:51425', transport: 'socket'
m.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)

from aws-apigateway-importer.

BenV avatar BenV commented on September 24, 2024

I am running into this as well, seems to just fail randomly:

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: f314f26e-75b3-11e5-bf67-d129670b76a0)
    at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1219)
    at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:803)
    at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:505)
    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:317)
    at com.amazonaws.hal.client.HalClient.invoke(HalClient.java:235)
    at com.amazonaws.hal.client.HalClient.putResource(HalClient.java:122)
    at com.amazonaws.hal.client.HalResourceInvocationHandler.invoke(HalResourceInvocationHandler.java:125)
    at com.sun.proxy.$Proxy38.putIntegration(Unknown Source)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createIntegration(ApiGatewaySdkSwaggerApiImporter.java:256)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.updateMethod(ApiGatewaySdkSwaggerApiImporter.java:411)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.updateMethods(ApiGatewaySdkSwaggerApiImporter.java:134)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.updateApi(ApiGatewaySdkSwaggerApiImporter.java:83)
    at com.amazonaws.service.apigateway.importer.impl.ApiGatewaySwaggerFileImporter.updateApi(ApiGatewaySwaggerFileImporter.java:58)
    at com.amazonaws.service.apigateway.importer.ApiImporterMain.execute(ApiImporterMain.java:143)
    at com.amazonaws.service.apigateway.importer.ApiImporterMain.main(ApiImporterMain.java:74)```

from aws-apigateway-importer.

rpgreen avatar rpgreen commented on September 24, 2024

We are looking into this - will post an update soon

from aws-apigateway-importer.

rpgreen avatar rpgreen commented on September 24, 2024

This was caused by a regression introduced with RAML support last week. I've just pushed a fix - let me know if you see this again.

FYI @AaronRustad - your file listed above has a conflicting resource path defined

from aws-apigateway-importer.

BenV avatar BenV commented on September 24, 2024

This is working fine for me after updating, thanks so much for the quick turnaround!

from aws-apigateway-importer.

AaronRustad avatar AaronRustad commented on September 24, 2024

Thanks, this solved my problem too.

from aws-apigateway-importer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.