0.11.0 • Published 8 days ago

oas-toolkit v0.11.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 days ago

oas-toolkit

oas-toolkit is a library and CLI for working with OpenAPI documents.

The CLI only supports YAML OpenAPI specifications currently

The project provides the following functionality:

  • Merge multiple OAS documents into a single file
  • Add/patch values in place
  • Remove arbritrary keys from the specification
  • Remove unused components

Merge

Usage:

oas-toolkit merge <one> <two> <three> > openapi.yml

Combining multiple OpenAPI specs has unspecified behaviour. This tool merges using the following algorithm:

Take the latest specified value for the following blocks:

  • openapi
  • info
  • servers
  • externalDocs

Merge the following lists/objects recursively. If you encounter a list, concatenate them together:

  • security
  • tags
  • components
  • paths

Remove by Annotation

oas-toolkit remove-with-annotation --annotation x-visibility.internal=true /tmp/openapi.yaml

Remove paths or operations from an OpenAPI spec based on an annotation. The example provided will remove any paths or operations with the following annotation:

{
  "x-visibility": {
    "internal": true
  }
}

You can pass --remove-unused to run remove-unused-components and remove-tags after running this command.

0.11.0

8 days ago

0.10.1

14 days ago

0.10.2

14 days ago

0.10.3

14 days ago

0.10.4

14 days ago

0.10.0

14 days ago

0.9.0

17 days ago

0.7.6

3 months ago

0.7.5

3 months ago

0.7.8

3 months ago

0.7.7

3 months ago

0.8.0

3 months ago

0.7.4

3 months ago

0.7.3

3 months ago

0.7.2

7 months ago

0.7.1

7 months ago

0.7.0

7 months ago

0.6.3

8 months ago

0.6.2

9 months ago

0.5.3

9 months ago

0.5.0

10 months ago

0.4.0

11 months ago

0.6.1

9 months ago

0.5.2

10 months ago

0.6.0

9 months ago

0.5.1

10 months ago

0.3.0

12 months ago

0.2.0

1 year ago

0.1.0

1 year ago