models

package
v2.1.2133-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 8 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) GenerateEnumsHelperFunctions added in v2.1.2134

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

func (*EncodingJsonGenerator) GenerateErrorModels added in v2.1.2134

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

func (*EncodingJsonGenerator) GenerateVersionModels added in v2.1.2134

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

type Generator added in v2.1.2134

type Generator interface {
	GenerateVersionModels(version *spec.Version) *generator.CodeFile
	GenerateErrorModels(httperrors *spec.HttpErrors) *generator.CodeFile
	EnumValuesStrings(model *spec.NamedModel) string
	GenerateEnumsHelperFunctions() *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