spec

package
v0.0.0-...-3ef84d1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverSpecFiles

func DiscoverSpecFiles(root string, patterns []string) ([]string, error)

Types

type OpenApiSpec

type OpenApiSpec struct {
	BaseURL string                          `yaml:"baseUrl"`
	Paths   map[string]map[string]Operation `yaml:"paths"`
}

func Load

func Load(filename string) (*OpenApiSpec, error)

type Operation

type Operation struct {
	Summary     string              `yaml:"summary"`
	Parameters  []Parameter         `yaml:"parameters"`
	RequestBody *RequestBody        `yaml:"requestBody"`
	Responses   map[string]Response `yaml:"responses"`
}

type Parameter

type Parameter struct {
	Name     string `yaml:"name"`
	In       string `yaml:"in"`
	Required bool   `yaml:"required"`
	Schema   struct {
		Type string `yaml:"type"`
	} `yaml:"schema"`
}

type RequestBody

type RequestBody struct {
	Content map[string]struct {
		Schema map[string]any `yaml:"schema"`
	} `yaml:"content"`
}

type Response

type Response struct {
	Description string `yaml:"description"`
}

Jump to

Keyboard shortcuts

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