Skip to main content
Help us improve Python packaging – donate today!

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())

Release history Release notifications

This version
History Node

0.0.4

History Node

0.0.3

History Node

0.0.1a0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
swaggertools-0.0.4-py3-none-any.whl (8.0 kB) Copy SHA256 hash SHA256 Wheel py3 May 9, 2016
swaggertools-0.0.4.tar.gz (20.9 kB) Copy SHA256 hash SHA256 Source None May 9, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page