Swagger tools
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())
Metadata
Release files for swaggertools 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| swaggertools-0.0.4.tar.gz | 20.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swaggertools-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.9 kB
Release files / swaggertools-0.0.4.tar.gz
| Download URL | swaggertools-0.0.4.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85e8a226515c9431b0e7e02357a650622a5c05e26845e4ad46241f5bf3f113dc
|
|
BLAKE2b-256 checksum How to use checksums |
4e19021f7ce8c9020606ad627df577813d40598bc679cfef7340953b4c0af397
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / swaggertools-0.0.4-py3-none-any.whl
| Download URL | swaggertools-0.0.4-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
761a6c860f0dc0b4b9813446ac0811a6ffe46cab0940a5d7c48248aead3580cd
|
|
BLAKE2b-256 checksum How to use checksums |
2830e80f4ce69e8ab7f51aec68183b17068ec2601bde80d20a6adedfe6e541d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |