Merge many files swagger specification into one file.
Project description
This library allows you to merge a many file swagger specification into a single one.
Quick start
For example, these two files:
# swagger.yml
/paths:
/users: {$ref: grafts/users.yml#/resources/collection}
# grafts/users.yml
/resources:
collection:
get:
200:
post:
201:
Will be merged as:
# swagger.yml
/paths:
/users:
get:
200:
post:
201:
Wich can be used to validate your API against editor.swagger.io.
Installation
pip install swaggertools
Usage
As a command line:
swagger-tools /path/to/swagger.yml
Into python script:
from swaggertools import resolve
with open('/path/to/swagger.yml') as filehandler:
app = resolve(filehandler)
print(app.to_yaml())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swaggertools-0.0.4.tar.gz.
File metadata
- Download URL: swaggertools-0.0.4.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85e8a226515c9431b0e7e02357a650622a5c05e26845e4ad46241f5bf3f113dc
|
|
| MD5 |
2d25869839b626449d7b11cb906edcf6
|
|
| BLAKE2b-256 |
4e19021f7ce8c9020606ad627df577813d40598bc679cfef7340953b4c0af397
|
File details
Details for the file swaggertools-0.0.4-py3-none-any.whl.
File metadata
- Download URL: swaggertools-0.0.4-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
761a6c860f0dc0b4b9813446ac0811a6ffe46cab0940a5d7c48248aead3580cd
|
|
| MD5 |
673767930499e426dd4849d0c7ce96a2
|
|
| BLAKE2b-256 |
2830e80f4ce69e8ab7f51aec68183b17068ec2601bde80d20a6adedfe6e541d0
|