OAS Patcher
A powerful command-line tool and Python library for working with OpenAPI Specification (OAS) Overlays. Modify and enhance your OpenAPI documents using a declarative overlay approach - no manual editing of large spec files needed!
Key Features
🎯 Overlay System - Apply targeted modifications to OpenAPI documents
📋 Copy Action - Duplicate schemas and components within your API (Overlay 1.1)
📦 Bundle Management - Organize multiple overlays into reusable bundles
🌍 Environment Support - Different configurations for dev, staging, production
🔧 Template Engine - Use variables and dynamic content with Jinja2
✅ Validation - Comprehensive validation for overlays and configurations
Supports OpenAPI Overlay Specification 1.0 and 1.1 - Use the latest features or maintain backward compatibility.
View all features in documentation →
Quick Start
Installation
pip install oas-patch
Basic Usage
- Apply an Overlay
oas-patch overlay openapi.yaml overlay.yaml -o modified.yaml
- Generate an Overlay (Diff)
oas-patch diff original.yaml modified.yaml -o overlay.yaml
- Validate an Overlay
oas-patch validate overlay.yaml
Example
# overlay.yaml
overlay: 1.1.0
info:
title: Production Environment Overlay
version: 1.0.0
description: Configures the API for production use
actions:
# Update server URL
- target: "$"
update:
servers:
- url: https://api.production.com
# Copy a schema to create a new one (Overlay 1.1 feature)
- target: "$.components.schemas.AdminUser"
copy: "$.components.schemas.User"
description: Create AdminUser schema based on User schema
Documentation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for oas-patch 0.6.0
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 |
|---|---|---|---|---|
| oas_patch-0.6.0.tar.gz | 21.0 kB | Without provenance | Details for oas_patch-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oas_patch-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for oas_patch-0.6.0-py3-none-any.whl |
Total release size: 45.1 kB
Release files / oas_patch-0.6.0.tar.gz
| Download URL | oas_patch-0.6.0.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f869196a459ad8552598c62aa1a89295fc828e847016ed466a3b1026a00ce4ee
|
|
BLAKE2b-256 checksum How to use checksums |
60189087789961394ed0c16986a9b06f98c931f15eac80404b38fa60e069ec00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / oas_patch-0.6.0-py3-none-any.whl
| Download URL | oas_patch-0.6.0-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a84222de2493d11a8384d4530e8fce28c153b75f4d87471699b3d5ab51e74fa
|
|
BLAKE2b-256 checksum How to use checksums |
94b69baf33d015899d5576a34c3a9abc91e9b23153e58252ac04a99586f04b63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for oas-patch 0.6.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.