#open-api #extract #yaml #swagger #specification #subset #operation

app swagstract

A tool to extract a subset of OpenAPI 3.* spec from yaml files

7 releases

0.1.6 Jul 25, 2023
0.1.5 Jul 25, 2023

#1738 in Web programming

MIT license

12KB
282 lines

swagstract

Description

This is a simple cli app that will extract selected operations (and related components) from a swagger file and output them to stdout. Supports OpenAPI 3.*.

Installation

Clone the repository and do cargo install . or do cargo install swagstract from crates.io.

Usage

swagstract -f <swagger file> -o <operation id> [-o <operation id> ...]

Features

  • Extracts single operation
  • Extracts multiple operations
  • Extracts related components and references

Dependencies

~4MB
~77K SLoC