swagstub

package
v2.0.1 Latest Latest
Warning

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

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

Documentation

Overview

Package swagstub provides stubs for swagger-based workflows. EXPERIMENTAL: This package is not yet API-stable.

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