- Notifications
You must be signed in to change notification settings - Fork19
Universal data structure and converter for API formats (Swagger, RAML, Paw, Postman…)
License
luckymarmot/API-Flow
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A flow written in ES6 using Immutable to convert between API description formats (Swagger, etc.) and other programs such as cURL command lines.
We currently support:
Swagger v2.0 (in/out)
RAML v1.0 (in/out)
Postman Collection v2.0 (in/out)
Paw v3.1 (in/out)
We intend to support:
Swagger v3.0
RAML v0.8
Postman Collection v1.0
Postman Dump v1.0
Insomnia v3.0
Api-Blueprint
- and many more.
just run
git clone https://github.com/luckymarmot/API-Flow.gitcd API-Flowmake install
This will install the node module dependencies
run the following command to build API-Flow for the different environments that you need
# use if you only want the node librarymake runners TARGET="node web webworker"
You can use the following command to add the different extensions to Paw
# use if you only want the swagger bindingsmake transfer TARGET="swagger raml1 postman2"
constApiFlow=require('api-flow');// if from npmconstApiFlow=require('./dist/node/api-flow.js');// if from `make runners`constoptions={source:{format:'swagger',version:'v2.0'},target:{format:'raml',version:'v1.0'}}constpromise=ApiFlow.transform({ options,uri:path.resolve(__dirname,'./my_super_swagger.yml')})promise.then((data)=>{// do some cool stuff with the data})
node ./bin/api-flow.js some_swagger.json -f swagger -t raml> converted.yml
API-Flow is one of the main components ofConsole.REST. If you're an API user, you can easily usehttps://console.rest/ to convert API description files. If you're an API provider, you can add a button to your API docs to let your users open and play with your API in client apps including Paw or Postman.
PRs are welcomed!Our sole requirement is that organizations that want to extend API-Flow to support their format write both a parser and a serializer, and not simply a serializer.
You can find more information about the internal structure of API-Flow insrc. We've also created a set of templates to help speed up the extension process:loader,parser, andenvironment
This repository is released under theMIT License. Feel free to fork, and modify!Copyright © 2016 Paw Inc.
SeeContributors.
About
Universal data structure and converter for API formats (Swagger, RAML, Paw, Postman…)