Comments (6)
Wow, I hadn't realised this was still in use. Is this still an issue now that swagger-api/swagger-ui#621 has been resolved/closed?
If so I'll have a look at accepting input from stdin.
from expand-swagger-refs.
I don't know about this particular issue, but it's quite handy when deploying an AWS API Gateway via a swagger template, as AWS has a limitation that they don't support references in response definitions (see https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html for details).
from expand-swagger-refs.
Ah, I hadn't even considered AWS Gateway. I'm likely to run into that issue myself at some point so I'll try and get this done soon.
from expand-swagger-refs.
@Dunedan If you're able to provide a sample schema that requires expansion that would be a great help.
from expand-swagger-refs.
The following one should be a pretty minimal example, which requires expansion, before it works with AWS API Gateway:
{
"swagger" : "2.0",
"info" : {
"version" : "1.0.0",
"title" : "Foo"
},
"paths" : {
"/foo" : {
"get" : {
"parameters" : [ ],
"responses" : {
"200" : {
"$ref" : "#/responses/bar"
}
},
"x-amazon-apigateway-integration" : {
"type" : "mock",
"responses" : {
"default" : {
"statusCode" : 200
}
},
"requestTemplates" : {
"application/json" : "{\"statusCode\" : 200}\n"
},
"passthroughBehavior" : "when_no_match"
}
}
}
},
"responses" : {
"bar" : {
"description" : "bar"
}
}
}
from expand-swagger-refs.
This util has been completely rewritten as an npm
module and now supports stdin
as well as direct function calls. See the homepage for more details and please raise any other issues/features separately.
from expand-swagger-refs.
Related Issues (2)
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 expand-swagger-refs.