https://github.com/danielgtaylor/apiscrub
OpenAPI Scrubber
https://github.com/danielgtaylor/apiscrub
Last synced: 4 months ago
JSON representation
OpenAPI Scrubber
- Host: GitHub
- URL: https://github.com/danielgtaylor/apiscrub
- Owner: danielgtaylor
- Created: 2018-09-05T16:34:23.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T04:53:21.000Z (over 3 years ago)
- Last Synced: 2025-09-30T02:21:50.128Z (10 months ago)
- Language: Python
- Size: 29.3 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# API Scrubber
An OpenAPI scrubber to process and remove certain information depending on the target audience. For example, given something like:
```yaml
paths:
/hello:
get:
description: Returns a hello world string.
/admin:
x-only: admin
get:
description: Get the admin settings
```
Then running `apiscrub input.yaml -` would result in:
```yaml
paths:
/hello:
get:
description: Returns a hello world string.
```
While running `apiscrub --keep=admin input.yaml -` would result in:
```yaml
paths:
/hello:
get:
description: Returns a hello world string.
/admin:
get:
description: Get the admin settings
```
Note that the `x-only` metadata extension tag gets removed in both cases.
## Installation
Install via Python:
```sh
$ pip install apiscrub
```
## License
Copyright © 2018 Daniel G. Taylor
http://dgt.mit-license.org/