config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package config handles loading and parsing the .respec.yaml configuration file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Info              *openapi3.Info                         `yaml:"info"`
	SecuritySchemes   map[string]*openapi3.SecuritySchemeRef `yaml:"securitySchemes"`
	RouterDefinitions []RouterDefinition                     `yaml:"routerDefinitions"`
}

Config represents the structure of the .respec.yaml file.

func Load

func Load(projectPath string) (*Config, error)

Load looks for a .respec.yaml file and loads it, providing defaults.

type RouterDefinition

type RouterDefinition struct {
	Type                     string   `yaml:"type"`
	EndpointMethods          []string `yaml:"endpointMethods"`
	GroupMethods             []string `yaml:"groupMethods"`
	MiddlewareWrapperMethods []string `yaml:"middlewareWrapperMethods"`
}

RouterDefinition allows users to teach `respec` about their routing library.

Jump to

Keyboard shortcuts

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