generator

package
v0.4.21 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorDefinition added in v0.4.15

type ErrorDefinition struct {
	Service string
	Status  string
	Code    string
	Title   string
}

type ErrorDefinitions added in v0.4.15

type ErrorDefinitions map[string]map[string][]GroupedErrorDetails

type Generator

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

Generator for go error types for the given json api error definition.

func (*Generator) BuildDefinitions

func (g *Generator) BuildDefinitions(errors runtime.Errors, packagePath, packageName string) (string, error)

func (*Generator) BuildMarkdown added in v0.4.15

func (g *Generator) BuildMarkdown(source string) (string, error)

func (*Generator) BuildSource

func (g *Generator) BuildSource(source, packagePath, packageName string) (string, error)

BuildSource generates the go code in the specified path with specified package name based on the passed schema source (url or file path)

type GroupedErrorDetails added in v0.4.15

type GroupedErrorDetails struct {
	Code  string
	Title string
}

Jump to

Keyboard shortcuts

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