swagstub

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package swagstub provides stable stubs for swagger-based workflows.

The package exists so projects can keep optional Swagger tooling isolated from runtime HTTP wiring. Prefer the docs endpoint and specs packages for normal OpenAPI serving paths.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() []string

List returns all registered spec names.

func Register

func Register(name string, spec *Spec)

Register stores the spec under the provided name.

Types

type Spec

type Spec struct {
	Version          string
	Host             string
	BasePath         string
	Schemes          []string
	Title            string
	Description      string
	InfoInstanceName string
	SwaggerTemplate  string
	LeftDelim        string
	RightDelim       string
}

Spec is a minimal stub of github.com/swaggo/swag.Spec used by generated docs. This allows generated swagger documentation to work without importing the full swag package.

func Get

func Get(name string) *Spec

Get retrieves a spec by name.

func (*Spec) InstanceName

func (s *Spec) InstanceName() string

InstanceName returns the registered instance name, defaulting to "swagger".

Jump to

Keyboard shortcuts

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