models

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NonStrict = "nonstrict"
View Source
var Strict = "strict"

Functions

func GenerateModels

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

Types

type EncodingJsonGenerator added in v2.1.2134

type EncodingJsonGenerator struct {
	Types   *types.Types
	Modules *Modules
	// contains filtered or unexported fields
}

func NewEncodingJsonGenerator added in v2.1.2134

func NewEncodingJsonGenerator(types *types.Types, modules *Modules, mode bool) *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(jsonmode string, 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