#open-api #extract #specification #yaml #swagger #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

#2262 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

~2.8–4MB
~74K SLoC