openapi

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(path string) (map[string]any, error)

Load reads an OpenAPI specification from path (JSON or YAML) and returns it as a generic map suitable for marshalling back to JSON.

func LoadAndBundle added in v0.2.0

func LoadAndBundle(path, rootFile string) (map[string]any, error)

LoadAndBundle reads an OpenAPI specification from path (a file or directory) and returns it as a generic map with all external $ref references resolved and inlined. When path is a directory, the root spec file is auto-detected using well-known names (openapi.yaml, openapi.json, swagger.yaml, …) or the rootFile hint. When path is a file, rootFile is ignored.

func SanitizeEnums

func SanitizeEnums(spec any)

SanitizeEnums walks the spec recursively and replaces every "enum" array with ["<enum>"], reducing noise in Postman diffs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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