codegen

package
v0.0.0-...-5905bd6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

gen-schema generates OpenAPI v3 schema portions from code.

Index

Constants

This section is empty.

Variables

View Source
var (
	OperationIDRE = regexp.MustCompile("^[a-zA-Z0-9]*$")
)
View Source
var PublicStructs = map[string]any{}/* 139 elements not displayed */

Functions

This section is empty.

Types

type AuthInfo

type AuthInfo struct {
	Scopes                 []string `json:"scopes"`
	Role                   string   `json:"role"`
	RequiresAuthentication bool     `json:"requiresAuthentication"`
}

type CodeGen

type CodeGen struct {
	// contains filtered or unexported fields
}

func New

func New(stderr io.Writer, specPath, opIDAuthPath, handlersPath string) *CodeGen

New returns a new internal code generator.

func (*CodeGen) EnsureCorrectMethodsPerTag

func (o *CodeGen) EnsureCorrectMethodsPerTag() error

func (*CodeGen) Generate

func (o *CodeGen) Generate() error

func (*CodeGen) GenerateSpecSchemas

func (o *CodeGen) GenerateSpecSchemas(structNames []string)

GenerateSpecSchemas creates OpenAPI schemas from code.

func (*CodeGen) ValidateProjectSpec

func (o *CodeGen) ValidateProjectSpec() error

Jump to

Keyboard shortcuts

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