openapi

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package openapi compiles an OpenAPI 3.x document into a clic spec.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BodyFields added in v0.7.0

func BodyFields(schema *openapi3.Schema) []form.Field

BodyFields maps an OpenAPI request-body schema into a UI-agnostic form.Field tree. It is a pure transformation: feed it a parsed schema and it yields the fields a renderer (a huh form today, a richer TUI later) can present.

An object schema expands into one field per property, in alphabetical order (OpenAPI property order is not preserved by the parser). A non-object schema is represented as a single field named "body".

func Compile

func Compile(data []byte) (*spec.App, error)

Compile parses an OpenAPI 3.x document and compiles it into a clic spec.

Types

This section is empty.

Jump to

Keyboard shortcuts

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