Skip to main content

Tool to trim OpenAPI YAML file to include only desired paths and components.

Reason this release was yanked:

Bug in exclude components option

Project description

OpenAPI Trimmer

Usage to make Open API file only for Quotes API, removing all others and also removing some DTOs:

./openapi-trimmer.py -i openapi.yaml \
  -p /v1/quotes \
  -ec CompanyConfigDto,CompanyConfigPagedDto,UpdateCompanyConfigDto

The output will be stored in openapi-trimmer.yaml

At the end validate with:

swagger-cli validate ./openapi-trimmer.yaml

Project details


Download files

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

Source Distribution

openapi_trimmer-0.1.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

openapi_trimmer-0.1.0-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page