models

package
v2.1.2215-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateModels

func GenerateModels(specification *spec.Spec, moduleName string, generatePath string) *generator.Sources

Types

type EncodingJsonGenerator added in v2.1.2134

type EncodingJsonGenerator struct {
	Types   *types.Types
	Modules *Modules
}

func NewEncodingJsonGenerator added in v2.1.2134

func NewEncodingJsonGenerator(types *types.Types, modules *Modules) *EncodingJsonGenerator

func (*EncodingJsonGenerator) EnumValuesStrings added in v2.1.2134

func (g *EncodingJsonGenerator) EnumValuesStrings(model *spec.NamedModel) string

func (*EncodingJsonGenerator) EnumsHelperFunctions added in v2.2.0

func (g *EncodingJsonGenerator) EnumsHelperFunctions() *generator.CodeFile

func (*EncodingJsonGenerator) ErrorModels added in v2.2.0

func (g *EncodingJsonGenerator) ErrorModels(httperrors *spec.HttpErrors) *generator.CodeFile

func (*EncodingJsonGenerator) Models added in v2.2.0

func (g *EncodingJsonGenerator) Models(version *spec.Version) *generator.CodeFile

type Generator added in v2.1.2134

type Generator interface {
	Models(version *spec.Version) *generator.CodeFile
	ErrorModels(httperrors *spec.HttpErrors) *generator.CodeFile
	EnumValuesStrings(model *spec.NamedModel) string
	EnumsHelperFunctions() *generator.CodeFile
}

func NewGenerator added in v2.1.2134

func NewGenerator(modules *Modules) Generator

type Modules added in v2.1.2134

type Modules struct {
	Root             module.Module
	Enums            module.Module
	HttpErrors       module.Module
	HttpErrorsModels module.Module
	// contains filtered or unexported fields
}

func NewModules added in v2.1.2134

func NewModules(moduleName string, generatePath string, specification *spec.Spec) *Modules

func (*Modules) Models added in v2.1.2134

func (p *Modules) Models(version *spec.Version) module.Module

Jump to

Keyboard shortcuts

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