openapi

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package openapi renders OpenAPI from the shared validated client manifest. It owns no parallel request, response, permission or validation declaration.

Index

Constants

View Source
const MaxServers = 16

MaxServers bounds Options.Servers.

View Source
const SpecificationVersion = "3.1.1"

Variables

This section is empty.

Functions

func Render

func Render(source *manifest.Manifest, options Options) ([]byte, error)

Render returns deterministic JSON with named schemas and operation IDs from registered descriptors. Title and APIVersion describe the consumer API and are required; they are not inferred from a module path or framework version.

Types

type Options

type Options struct {
	Title      string
	APIVersion string
	Servers    []Server
}

Options describe the consumer API. Servers are optional base URLs, either absolute http(s) URLs without credentials, query or fragment, or paths relative to the document such as "/api".

func (Options) Validate

func (o Options) Validate() error

Validate checks the required title and version and every server entry.

type Server

type Server struct {
	URL         string
	Description string
}

Server is one OpenAPI server entry.

Jump to

Keyboard shortcuts

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