Metadata-Version: 2.4
Name: oas_patch
Version: 0.5.6
Summary: A complete cli/lib to apply overlays to OpenAPI documents, powering your ci/cd and API lifecycle
Home-page: https://github.com/mcroissant/oas_patcher
Author: Matthieu Croissant
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyYAML>=6.0
Requires-Dist: jsonpath-ng>=1.7.0
Requires-Dist: jsonschema>=4.23.0
Requires-Dist: deepdiff>=8.4.2
Requires-Dist: Jinja2>=3.1.0
Requires-Dist: rich>=13.0.0
Requires-Dist: click>=8.0.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# 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!

[![Documentation](https://img.shields.io/badge/docs-online-blue)](https://mcroissant.github.io/oas_patcher/)
[![PyPI version](https://badge.fury.io/py/oas-patch.svg)](https://badge.fury.io/py/oas-patch)

> **Try it now:** [Online Demo](https://vbtn4932y3.execute-api.us-east-1.amazonaws.com/dev/)

## Key Features

🎯 **Overlay System** - Apply targeted modifications to OpenAPI documents  
📦 **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  

[View all features in documentation →](https://mcroissant.github.io/oas_patcher/core-concepts/overlays/)

## Quick Start

### Installation

```bash
pip install oas-patch
```

### Basic Usage

1. **Apply an Overlay**
```bash
oas-patch overlay openapi.yaml overlay.yaml -o modified.yaml
```

2. **Generate an Overlay (Diff)**
```bash
oas-patch diff original.yaml modified.yaml -o overlay.yaml
```

3. **Validate an Overlay**
```bash
oas-patch validate overlay.yaml
```

## Example

```yaml
# overlay.yaml
overlay: 1.0.0
info:
  title: Production Environment Overlay
actions:
  - target: "$"
    update:
      servers:
        - url: https://api.production.com
```


## Documentation

- 📚 [Full Documentation](https://mcroissant.github.io/oas_patcher/)
- 🚀 [Getting Started Guide](https://mcroissant.github.io/oas_patcher/getting-started/quick-start/)
- 💡 [Core Concepts](https://mcroissant.github.io/oas_patcher/core-concepts/overlays/)

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
