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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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