Comments (13)
I actually have a generic example that produces it as well, so I'll paste it here:
{
"swagger": "2.0",
"info": {
"title": "Conflict Error Example",
"description": "This will produce a conflicting path error",
"version": "2.0.0"
},
"schemes": [
"http"
],
"produces": [
"application/json"
],
"paths": {
"/v1/owls": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v1/owls/{id}/beaks": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v1/owls/{id}/beaks/{type}": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v2/owls/ridiculously/long/path/for/testing/purposes": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v2/owls/{id}/beaks/ridiculously/long/path/for/testing/purposes": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v2/owls/{id}/beaks/{type}/ridiculously/long/path/for/testing/purposes": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v3/owls": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v3/owls/{id}/beaks": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v3/owls/{id}/beaks/{type}": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v4/owls": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v4/owls/{id}/beaks": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v4/owls/{id}/beaks/{type}": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v4/owls/ridiculously/long/path/for/testing/purposes": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v4/owls/{id}/beaks/ridiculously/long/path/for/testing/purposes": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v4/owls/{id}/beaks/{type}/ridiculously/long/path/for/testing/purposes": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
}
}
}
from aws-apigateway-importer.
Thanks. Your Swagger file looks good to me. We will investigate this on the
service side and get back to you.
On Tuesday, August 11, 2015, sbacquie-carecloud [email protected]
wrote:
I actually have a generic example that produces it as well, so I'll paste
it here:{
"swagger": "2.0",
"info": {
"title": "Conflict Error Example",
"description": "This will produce a conflicting path error",
"version": "2.0.0"
},
"schemes": [
"http"
],
"produces": [
"application/json"
],
"paths": {
"/v1/owls": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v1/owls/{id}/beaks": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v1/owls/{id}/beaks/{type}": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v2/owls/ridiculously/long/path/for/testing/purposes": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v2/owls/{id}/beaks/ridiculously/long/path/for/testing/purposes": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v2/owls/{id}/beaks/{type}/ridiculously/long/path/for/testing/purposes": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v3/owls": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v3/owls/{id}/beaks": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v3/owls/{id}/beaks/{type}": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v4/owls": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v4/owls/{id}/beaks": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v4/owls/{id}/beaks/{type}": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v4/owls/ridiculously/long/path/for/testing/purposes": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v4/owls/{id}/beaks/ridiculously/long/path/for/testing/purposes": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
},
"/v4/owls/{id}/beaks/{type}/ridiculously/long/path/for/testing/purposes": {
"get": {
"responses": {
"200": {
"description": "test placeholder"
}
},
"parameters": [
{
"name": "authentication",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string"
}
],
"x-amazon-apigateway-integration": {
"type": "http",
"uri": "https://testapi12345.net/",
"httpMethod": "GET",
"responses": {
"200": {
"statusCode": "200"
}
}
}
}
}
}
}—
Reply to this email directly or view it on GitHub
#15 (comment)
.
from aws-apigateway-importer.
This issue, I believe, is solved by my pull request. Since the aws api only returns 25 resources, odds are high that one of your resources doesn't come back with the request, so the api importer tries to create something that already exists.
from aws-apigateway-importer.
Yes, I believe so as well.
I'm running your pagination branch against the JSON I provided, and it doesn't error out, but after a while it just hangs and stops importing.
from aws-apigateway-importer.
Thanks for the help @cfair. I have merged in your changes with some modifications. @sbacquie-carecloud please pull and confirm
from aws-apigateway-importer.
After pulling the latest code, I'm getting the same behavior as in my previous comment. No error, but the importer hangs indefinitely and the import never finishes.
from aws-apigateway-importer.
At what point does it appear to hang? What's the last log message?
from aws-apigateway-importer.
It seems to hang when creating a method. When I run it through Eclipse in Debug mode, and then hit Pause after it hangs, it seems to be stuck on sleep(). Here are the last few log messages:
2015-08-11 15:07:22,770 INFO - Creating method parameter for api 5cfck3i83l and method GET with name method.request.querystring.authentication
2015-08-11 15:07:22,833 INFO - Creating integration with type HTTP
2015-08-11 15:07:23,023 INFO - Creating method for api id 5cfck3i83l and resource id s9o3n7 with method get
2015-08-11 15:07:25,668 INFO - Creating resource '{id}' with parent 'owls'
2015-08-11 15:07:27,031 INFO - Creating resource 'beaks' with parent '{id}'
2015-08-11 15:07:27,754 INFO - Creating method response for api 5cfck3i83l and method GET and status 200
2015-08-11 15:07:27,893 INFO - Creating method parameter for api 5cfck3i83l and method GET with name method.request.querystring.authentication
2015-08-11 15:07:27,952 INFO - Creating method parameter for api 5cfck3i83l and method GET with name method.request.path.id
2015-08-11 15:07:28,013 INFO - Creating integration with type HTTP
2015-08-11 15:07:28,197 INFO - Creating method for api id 5cfck3i83l and resource id fd5crr with method get
2015-08-11 15:07:32,243 INFO - Creating resource 'ridiculously' with parent 'beaks'
2015-08-11 15:07:33,577 INFO - Creating resource 'long' with parent 'ridiculously'
2015-08-11 15:07:34,920 INFO - Creating resource 'path' with parent 'long'
2015-08-11 15:07:36,260 INFO - Creating resource 'for' with parent 'path'
2015-08-11 15:07:37,587 INFO - Creating resource 'testing' with parent 'for'
2015-08-11 15:07:38,934 INFO - Creating resource 'purposes' with parent 'testing'
2015-08-11 15:07:39,657 INFO - Creating method response for api 5cfck3i83l and method GET and status 200
2015-08-11 15:07:39,809 INFO - Creating method parameter for api 5cfck3i83l and method GET with name method.request.querystring.authentication
2015-08-11 15:07:39,875 INFO - Creating method parameter for api 5cfck3i83l and method GET with name method.request.path.id
2015-08-11 15:07:39,937 INFO - Creating integration with type HTTP
2015-08-11 15:07:40,126 INFO - Creating method for api id 5cfck3i83l and resource id dqa1ux with method get
2015-08-11 15:07:46,631 INFO - Creating resource '{type}' with parent 'beaks'
2015-08-11 15:07:47,992 INFO - Creating method response for api 5cfck3i83l and method GET and status 200
2015-08-11 15:07:48,123 INFO - Creating method parameter for api 5cfck3i83l and method GET with name method.request.querystring.authentication
2015-08-11 15:07:48,181 INFO - Creating method parameter for api 5cfck3i83l and method GET with name method.request.path.id
2015-08-11 15:07:48,269 INFO - Creating method parameter for api 5cfck3i83l and method GET with name method.request.path.type
2015-08-11 15:07:48,361 INFO - Creating integration with type HTTP
2015-08-11 15:07:48,556 INFO - Creating method for api id 5cfck3i83l and resource id wi1b89 with method get
from aws-apigateway-importer.
It seems to get stuck in an endless loop right there. The condition in the while loop is always true.
Should I open a new issue?
from aws-apigateway-importer.
I changed that line to:
resources = resources.getNext();
And it seems to work fine now.
from aws-apigateway-importer.
Good catch - this is fixed now
from aws-apigateway-importer.
I am still getting the error
Resource with id 'dladxj' has a conflicting path (Service: null; Status Code: 400; Error Code: null; Request ID: 5ff14a90-8302-11e5-9c20-a7b0452cd4d8)
Any pointers?
from aws-apigateway-importer.
You have conflicting endpoints:
This for example would create a conflict
/events/users/
/events/{event_id}
You could do the following to solve it:
/events/users/
/events?event_id={event_id}
best
ᐧ
On Wed, Nov 4, 2015 at 9:48 AM, shraddhabhata [email protected]
wrote:
I am still getting the error
Resource with id 'dladxj' has a conflicting path (Service: null; Status
Code: 400; Error Code: null; Request ID:
5ff14a90-8302-11e5-9c20-a7b0452cd4d8)Any pointers?
—
Reply to this email directly or view it on GitHub
#15 (comment)
.
Nicolas Menciere
Co-Founder and CTO
Sport Archive Inc.
from aws-apigateway-importer.
Related Issues (20)
- Duplicate Model In Swagger File Because Of Same RequestBody variable Name HOT 1
- import Swagger failed - Parameter type formData not supported HOT 7
- com.amazonaws.util.json.JSONObject No Longer Available HOT 1
- Unable to import api definition from aws console? HOT 19
- Custom Authorizers wont' send CORS headers HOT 5
- "Invalid Mapping Expression Parameter" Error Thrown on method.request.path when Importing RAML with Nested uriParameters
- Support for ANY method with http proxy? HOT 1
- Polymorphism not supported? HOT 1
- Unable to create resource at path '/user/{userId}/fans': A sibling ({bizId}) of this resource already has a variable path part -- only one is allowed HOT 3
- A Linux AMI aws configuration HOT 1
- Root security definition HOT 2
- What's the relationship between Swagger definition and header returned by Lambda function? HOT 2
- Lambda invocation definition, does SAM respect ApiGateway section or Lambda section? HOT 2
- Importer does not create UserPoolAuthorizer. HOT 1
- Swagger import failing (created via app.swaggerhub.com, validated on http://editor.swagger.io/) HOT 3
- Error importing Swagger
- Explicit error message + support `example` swagger key
- base path issues with open banking API specifications
- Default value of properties
- Invalid model specified: Validation Result: warnings : [], errors : [Invalid model schema specified]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-apigateway-importer.