openapi

package
v2.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 6 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 derives an OpenAPI 3.1 document from a mounted chi router.

The route list is read with chi.Walk, so the document always matches what is actually mounted, including optional features switched on in Config. A small table adds summaries, tags and security for the well-known auth routes; any other route is still listed with a generated summary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(r chi.Routes, info Info) ([]byte, error)

Generate walks r and returns the OpenAPI document as indented JSON.

Types

type Info

type Info struct {
	Title       string
	Version     string
	Description string
	// ServerURL is added as the single server entry when non-empty.
	ServerURL string
}

Info is the document header.

Jump to

Keyboard shortcuts

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