gen

package
v2.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefinitionsPrefix = "#/definitions/"

Variables

View Source
var TemplateFuncs = template.FuncMap{
	"notLast": func(index int, len int) bool {
		return index+1 != len
	},
	"title": title,
	"camelCase": func(s string) string {
		s = title(s)
		lowerFirst := strings.ToLower(s[:1])

		return lowerFirst + s[1:]
	},
}

Functions

func GetMethodName added in v2.4.2

func GetMethodName(methodName string) string

GetMethodName extract method from string like "namespace.method"

func GetNamespace added in v2.4.2

func GetNamespace(methodName string) string

GetNamespace extract namespace from string like "namespace.method"

func GetNamespaceNames added in v2.4.2

func GetNamespaceNames(schema smd.Schema) (res []string)

GetNamespaceNames return all namespace names from schema.

func StringToSlice added in v2.4.3

func StringToSlice(in, separator string) []string

Types

type GeneratorData

type GeneratorData struct {
	Version string
}

func DefaultGeneratorData

func DefaultGeneratorData() GeneratorData

Jump to

Keyboard shortcuts

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