Metadata-Version: 2.4
Name: oas_patch
Version: 0.3.8
Summary: A tool to apply overlays to OpenAPI documents, and create an overlay from the difference of 2 openapi files.
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
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# OAS Patcher

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](https://vbtn4932y3.execute-api.us-east-1.amazonaws.com/dev/)



## Features

- Apply OpenAPI Overlays to existing OpenAPI documents
- Generate overlay files by comparing two OpenAPI documents
- Validate OpenAPI Overlay documents against the specification

## Installation

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

## Usage

### Apply an Overlay

Apply changes from an overlay file to an OpenAPI document:

```bash
oas-patch 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

### Generate an Overlay (Diff)

Create an overlay file by comparing two OpenAPI documents:

```bash
oas-patch diff original.yaml modified.yaml -o overlay.yaml
```

Options:
- `-o, --output`: Path to save the generated overlay file (optional, defaults to stdout)

### Validate an Overlay

Validate an OpenAPI Overlay document against the specification:

```bash
oas-patch validate overlay.yaml --format yaml
```

Options:
- `--format`: Output format for validation results (choices: sh, log, yaml; default: sh)

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