codegen

package
v0.0.0-...-48c7fd9 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTemplateFile

func GenerateTemplateFile(ctx context.Context, d *Data) (err error)

func LoadAPIDefinition

func LoadAPIDefinition(specPath string) (swagger *openapi3.T, err error)

Types

type Collection

type Collection struct {
	CollectionRef string
	ItemRef       string
	ModelRef      string
	IteratorRef   string
}

type CollectionParams

type CollectionParams = struct {
	Collections
	MessageCollections
	NotificationFeedCollections
}

func GetCollections

func GetCollections(swagger *openapi3.T) (collections CollectionParams, err error)

type Collections

type Collections = []Collection

type Data

type Data struct {
	Params          any
	SpecPath        string
	TemplatePath    string
	DestinationPath string
}

func GenerateDataStruct

func GenerateDataStruct(cfg ExtensionsConfig) (d *Data, err error)

type ExtensionsConfig

type ExtensionsConfig struct {
	Input    string `mapstructure:"input"`
	Output   string `mapstructure:"output"`
	Template string `mapstructure:"template"`
}

func DefaultExtensionsConfig

func DefaultExtensionsConfig() *ExtensionsConfig

func (*ExtensionsConfig) Validate

func (cfg *ExtensionsConfig) Validate() error

type MessageCollection

type MessageCollection struct {
	ItemRef     string
	IteratorRef string
}

type MessageCollections

type MessageCollections []MessageCollection

type NotificationFeedCollection

type NotificationFeedCollection struct {
	ItemRef     string
	IteratorRef string
}

type NotificationFeedCollections

type NotificationFeedCollections []NotificationFeedCollection

Jump to

Keyboard shortcuts

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