openapi

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 15 Imported by: 1 module, 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

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