Skip to main content

Aggregate several swagger APIs in one

Project description

Travis status


Swagger-aggregator allow you to create a swagger REST API from several other swagger REST APIs.

This can be really useful if you want to make an API Gateway accessing some of your internal APIs. You can also filter which path you want to deliver, and which properties of your definitions you don’t want to show.

Example Usage

Here is an example of an aggregate configuration.

args: pet_url

  version: "0.1"
  title: "API Gateway"

basePath: /v2

    pet: http://pet_url/v2

  - DELETE /pets/{petId}

    - id

This is not the most useful aggregation, as it only aggregate one API. The first part, args, define that the first parameter we will send to the aggregate will be pet_url. Then pet_url will be replaced by the given value everywhere in the config. The two next part, info and basePath, are the same as the ones you can find in every swagger API. apis, define the different APIs you want to aggregate. A name is associated with it URL. Then exclude_paths allow you to not deliver some path. In this case we don’t want the user to delete a pet.

Finally, exclude_fields define the attributes of the definitions we do not want to show. The value of the keys is the name of the API followed by the name of the definition. The value of each key will be a list of all properties to exclude.

Then use this command to generate the aggregated swagger file:

from traxit_aggregator import SwaggerAggregator

SwaggerAggregator('config.yaml', '')


More documentation is available at


make install or pip install swagger-aggregator


swagger-aggregator is licensed under


0.1.1 (2016-1-31)

  • Change license to MIT.

0.1 (2016-1-29)

  • First release on PyPI.

Project details

Download files

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

Files for swagger-aggregator, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size swagger_aggregator-0.1.1.tar.gz (17.1 kB) File type Source Python version None Upload date Hashes View
Filename, size swagger_aggregator-0.1.1-py2.py3-none-any.whl (8.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page