A command-line tool for working with OpenAPI Specification (OAS) Overlays, allowing you to patch and modify OpenAPI documents.
NOTE try it now : Online Demo
- Apply OpenAPI Overlays to existing OpenAPI documents
- Generate overlay files by comparing two OpenAPI documents
- Validate OpenAPI Overlay documents against the specification
pip install oas-patcher
Apply changes from an overlay file to an OpenAPI document:
oas-patcher overlay openapi.yaml overlay.yaml -o modified.yaml
Options:
-o, --output
: Path to save the modified OpenAPI document (optional, defaults to stdout)--sanitize
: Remove special characters from the OpenAPI document
Create an overlay file by comparing two OpenAPI documents:
oas-patcher diff original.yaml modified.yaml -o overlay.yaml
Options:
-o, --output
: Path to save the generated overlay file (optional, defaults to stdout)
Validate an OpenAPI Overlay document against the specification:
oas-patcher validate overlay.yaml --format yaml
Options:
--format
: Output format for validation results (choices: sh, log, yaml; default: sh)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.