filters

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByPath

func ByPath(file io.Reader, allowedPaths []string) (filteredSpec []byte, err error)

ByPath removes all the endpoints that are not specified in the given list of.

It also, removes all the schema definitions which are not used by the white-listed endpoints keeping the schemas which are referenced by other schemas recursively.

For now, it supports only `components/schemas/*` as references (no responses, for example).

func JSONToYAML

func JSONToYAML(j []byte) ([]byte, error)

Types

type Any

type Any = interface{}

type Entry

type Entry = map[string]Any

type Nothing

type Nothing = struct{}

Jump to

Keyboard shortcuts

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