Swaggerizer
A lightweight CLI tool to modularize, maintain, and publish OpenAPI docs.
Swaggerizer takes a practical approach to OpenAPI docs management, in the sweet spot between too monolithic or too granular. It breaks up OpenAPI spec files by functional groups and uses a simple make-based system to reassemble them.
The Swaggerizer project structure makes it easy for a single writer to build and maintain OpenAPI docs, or for a team of writers to collaborate using a docs-as-code approach.
Swaggerizing your OpenAPI docs is risk free. It creates a separate source folder with the modularized project files, so you can test it out before committing to anything. Give it a try!
Features
- Create a modular OpenAPI project from a single OpenAPI YAML file:
- Modularize an existing OpenAPI file, or start a new project from the default Petstore file
- Use make to test and reassemble a single OpenAPI file out of the project/source files
- Project files are set up in the openapi_src sub-directory, with the following structure:
openapi_src/ ├── 0_intro/ # Basic info, metadata, and tags ├── 1_endpoints/ # Endpoint descriptions grouped by tag (one file per tag) ├── 2_components/ # Reusable objects (schemas, parameters, examples, etc.) ├── 3_misc/ # Additional top-level sections not categorized above └── makefile # Custom makefile to generate the final OpenAPI file
- Other features:
- Convert OpenAPI files from JSON → YAML or YAML → JSON
- Validate YAML/JSON file formats
- Export an OpenAPI YAML file as HTML for publishing
Prerequisites
- Python 3.8 or later
- make
Installation
Install using pip:
pip install swaggerizer
Verify the installation:
swgrzr --help
Quick start
Create a new swaggerizer project from your existing openapi.yaml file:
swgrzr create -i openapi.yaml
Create a new swaggerizer project from the default Petstore file:
swgrzr create
Build a testing version of the complete OpenAPI file from source:
cd openapi_src
make
Copy the current testing version of the OpenAPI file into the parent directory for publishing:
make final-build
Export the OpenAPI YAML file as HTML:
swgrzr export -i openapi.yaml
CLI usage
Syntax
swgrzr OPERATION [options]
Available operations
| Operation | Description |
|---|---|
| create | Create a new modularized project from an OpenAPI YAML file. |
| export | Export the input OpenAPI YAML as a rendered HTML document. |
| json2yaml | Convert an OpenAPI JSON file to YAML. |
| yaml2json | Convert an OpenAPI YAML file to JSON. |
| validate | Validate basic JSON or YAML structure. |
Common options
| Option | Description |
|---|---|
| -i, --input | Input file path. Defaults vary by operation. |
| -o, --output | Output file path. Defaults vary by operation. |
| -t, --type | Input type for validation (json, yaml). |
How it works
To create a modularized OpenAPI docs project, swaggerizer:
- Loads the source OpenAPI YAML.
- Detects the OpenAPI version (
v2orv3). - Extracts and groups the OpenAPI sections.
- Generates the modular project source directory.
- Adds the makefile to rebuild the spec.
Source code overview
swaggerizer/ # Metadata and packaging
├── swaggerizer/ # Python app source
│ ├── cli.py # CLI entry point
│ ├── files/ # Default assets
│ └── helpers/ # Helper modules
How to help
Feedback is appreciated!
Please:
- Report bugs or unexpected behavior.
- Propose enhancements to CLI commands or options.
To contribute:
- Fork the swaggerizer repo.
- Create a branch for your changes.
- Run tests before submitting.
- Open a pull request describing your changes and motivation.
Smaller, focused pull requests are preferred.
Metadata
Release files for swaggerizer 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| swaggerizer-0.1.1.tar.gz | 21.5 kB | With provenance | Details for swaggerizer-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swaggerizer-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for swaggerizer-0.1.1-py3-none-any.whl |
Total release size: 44.5 kB
Release files / swaggerizer-0.1.1.tar.gz
| Download URL | swaggerizer-0.1.1.tar.gz |
|---|---|
| Size | 21.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02f4ace36393cfc2c0c54ee08f37b8f90510c6c55758bb6045e0f0e4ebb5c563
|
|
BLAKE2b-256 checksum How to use checksums |
c38f7dd973ea7f14124ff23cdf82424a210add12c8be0b123d113a2fccc2f004
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 5, 2026.
Transparency logRelease files / swaggerizer-0.1.1-py3-none-any.whl
| Download URL | swaggerizer-0.1.1-py3-none-any.whl |
|---|---|
| Size | 22.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6bc00ba54f0a6fc9c7e5a537122d9e329d8d568fde712696fb302a1885ebd850
|
|
BLAKE2b-256 checksum How to use checksums |
f59fee172f9fa4a03552772a5c7c37b5566adba0ae17b726e6c9b6a90b1a9bcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 5, 2026.
Transparency logSecurity for swaggerizer 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for swaggerizer-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.