0.14.0 • Published 2 months ago

oas-toolkit v0.14.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 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.14.0

2 months ago

0.12.0

8 months ago

0.12.1

8 months ago

0.13.1

7 months ago

0.12.2

8 months ago

0.12.3

8 months ago

0.12.4

8 months ago

0.11.0

1 year ago

0.10.1

1 year ago

0.10.2

1 year ago

0.10.3

1 year ago

0.10.4

1 year ago

0.10.0

1 year ago

0.9.0

1 year ago

0.7.6

1 year ago

0.7.5

1 year ago

0.7.8

1 year ago

0.7.7

1 year ago

0.8.0

1 year ago

0.7.4

1 year ago

0.7.3

1 year ago

0.7.2

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.5.3

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.6.1

2 years ago

0.5.2

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago