0.13.1 • Published 3 months ago

oas-toolkit v0.13.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months 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 arbitrary 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.12.0

4 months ago

0.12.1

4 months ago

0.13.1

3 months ago

0.12.2

4 months ago

0.12.3

4 months ago

0.12.4

4 months ago

0.11.0

8 months ago

0.10.1

8 months ago

0.10.2

8 months ago

0.10.3

8 months ago

0.10.4

8 months ago

0.10.0

8 months ago

0.9.0

8 months ago

0.7.6

11 months ago

0.7.5

11 months ago

0.7.8

11 months ago

0.7.7

11 months ago

0.8.0

11 months ago

0.7.4

11 months ago

0.7.3

11 months ago

0.7.2

1 year ago

0.7.1

1 year ago

0.7.0

1 year ago

0.6.3

1 year ago

0.6.2

1 year ago

0.5.3

1 year ago

0.5.0

1 year ago

0.4.0

2 years ago

0.6.1

1 year ago

0.5.2

1 year ago

0.6.0

1 year ago

0.5.1

1 year ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago