transform

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package transform filters, simplifies and prunes a spec as a YAML node tree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(doc *oasdoc.Doc, f config.Filter) (bool, []diag.Diagnostic)

Filter drops the operations, webhooks, schema properties and schema extensions f leaves out, in place. Exclude wins over include, and an empty include list keeps everything.

func HasOperations

func HasOperations(doc *oasdoc.Doc) bool

HasOperations reports whether any path or webhook has an operation.

func Prune

func Prune(doc *oasdoc.Doc) (bool, []diag.Diagnostic)

Prune removes components that no path or webhook reaches, then empty component maps, in place. Security schemes stay when a security requirement names them.

func Simplify

func Simplify(doc *oasdoc.Doc, s config.Simplify) bool

Simplify rewrites the top-level schemas of components, parameters, bodies and responses so they are simpler to generate from, and strips x- keys from every schema under them.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL