api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package api embeds the OpenAPI contract.

The YAML file is the authored source of truth; the JSON form is derived from it once at first use, because most tooling asks for JSON while humans and diffs are better served by YAML. Deriving rather than committing both means the two can never disagree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpecJSON

func SpecJSON() ([]byte, error)

SpecJSON returns the OpenAPI document converted to JSON.

The conversion is mechanical: yaml.v3 decodes mappings into map[string]any, which encoding/json accepts directly. An error here means the embedded YAML is malformed, which the contract tests catch long before a binary ships — but the error is still returned rather than panicking, because serving docs is never worth crashing the redirect path.

func SpecYAML

func SpecYAML() []byte

SpecYAML returns the OpenAPI document as authored.

Types

This section is empty.

Jump to

Keyboard shortcuts

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