Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thecopy/apiary2postman
Tool for generating a Postman collection from Blueprint API markup or the Apiary API
https://github.com/thecopy/apiary2postman
api-blueprint apiary drafter postman postman-apps postman-collection python
Last synced: about 1 month ago
JSON representation
Tool for generating a Postman collection from Blueprint API markup or the Apiary API
- Host: GitHub
- URL: https://github.com/thecopy/apiary2postman
- Owner: thecopy
- License: mit
- Created: 2014-05-30T07:35:11.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-31T15:27:37.000Z (almost 7 years ago)
- Last Synced: 2024-09-29T18:22:41.704Z (about 1 month ago)
- Topics: api-blueprint, apiary, drafter, postman, postman-apps, postman-collection, python
- Language: Python
- Homepage:
- Size: 40 KB
- Stars: 205
- Watchers: 6
- Forks: 28
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
apiary2postman
==============Tool for generating a Postman collection from an API Blueprint, or an API Blueprint hosted on Apiary.
Supports
* [API Blueprint](https://apiblueprint.org)
* [API Blueprint AST](https://github.com/apiaryio/api-blueprint-ast), which can be generated by [Drafter](https://github.com/apiaryio/drafter)
* Fetching an API Blueprint from Apiary API
# Prerequisites[Drafter](https://github.com/apiaryio/drafter) < 2.0 is required if you want to use API Blueprint/Apiary API.
To install on OS X:
brew install --HEAD https://raw.githubusercontent.com/apiaryio/drafter/b3dce8dda5d48b36e963abeffe5b0de7afecac3d/tools/homebrew/drafter.rb
To install from source:git clone https://github.com/apiaryio/drafter
cd drafter
git checkout b3dce8d # This is the commit for release 0.1.9
git submodule update --init --recursive # Get all the dependencies needed for compile
./configure
make
sudo make installDrafter is used to convert Blueprint API to JSON. The preferred version is v0.1.9.
Drafter v2 changed the JSON output format to be incomptabile with apiary2postman.
Feel free to submit a pull request which fixes this.# Installation
pip install apiary2postman
### Or, run from your checkout
git clone
cd apiary2postman/apiary2postman
./apiary2postman.py# Usage
apiary2postman json blueprint.json --output postman.json
##### If you have the API Blueprint, use the `blueprint` subcommand:
apiary2postman blueprint some.blueprint > postman.dump
It is also possible to pipe everything:cat some.blueprint | apiary2postman blueprint > postman.dump
##### To generate a total Postman environment dump from Apiary API, use the `api` subcommand with your Apiary API name:
apiary2postman api my_api > my_api.dumpIf you don't have an API key, go to https://login.apiary.io/tokens. Generate one if needed, and set the environment variable `APIARY_API_KEY` to that hex string.
APIARY_API_KEY=ffffffffffffffffffffffffffffffff apiary2postman api my_api > my_api.dump
Or to generate only a Postman collection from Apiary API:
apiary2postman --only-collection api my_api > my_api.collection
It's also possible to specify the output file using the `--output`.
##### If you have the API Blueprint AST already generated, use the `json` subcommand:
apiary2postman json some.json > postman.dump
It is also possible to pipe everything:cat some.json | apiary2postman json > postman.dump
##### Single Collection
To force all resource groups to be created as Folder within the same Postman collection use `--single-collection` option.# Contribution
Contributions are greatly appreciated. What is most lacking is tests and would be super-grealy appreciated.