generators

package
v2.1.2212-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client = generator.Generator{
	"client-scala",
	"Scala Client",
	"Generate Scala client source code",
	[]generator.GeneratorArg{
		{Arg: generator.ArgSpecFile, Required: true},
		{Arg: generator.ArgGeneratePath, Required: true},
	},
	func(specification *spec.Spec, params generator.GeneratorArgsValues) *generator.Sources {
		return GenerateSttpClient(specification, "", params[generator.ArgGeneratePath])
	},
}
View Source
var Models = generator.Generator{
	"models-scala",
	"Scala Models",
	"Generate Scala models source code",
	[]generator.GeneratorArg{
		{Arg: generator.ArgSpecFile, Required: true},
		{Arg: generator.ArgGeneratePath, Required: true},
	},
	func(specification *spec.Spec, params generator.GeneratorArgsValues) *generator.Sources {
		return GenerateCirceModels(specification, "", params[generator.ArgGeneratePath])
	},
}
View Source
var Service = generator.Generator{
	"service-scala",
	"Scala Service",
	"Generate Scala service source code",
	[]generator.GeneratorArg{
		{Arg: generator.ArgSpecFile, Required: true},
		{Arg: generator.ArgSwaggerPath, Required: false},
		{Arg: generator.ArgGeneratePath, Required: true},
		{Arg: generator.ArgServicesPath, Required: false},
	},
	func(specification *spec.Spec, params generator.GeneratorArgsValues) *generator.Sources {
		return GeneratePlayService(specification, params[generator.ArgSwaggerPath], params[generator.ArgGeneratePath], params[generator.ArgServicesPath])
	},
}

Functions

func DefaultValue

func DefaultValue(typ *spec.TypeDef, value string) string

func GenerateCirceModels

func GenerateCirceModels(specification *spec.Spec, packageName string, generatePath string) *generator.Sources

func GeneratePlayService

func GeneratePlayService(specification *spec.Spec, swaggerPath string, generatePath string, servicesPath string) *generator.Sources

func GenerateSttpClient

func GenerateSttpClient(specification *spec.Spec, packageName string, generatePath string) *generator.Sources

func JoinParams

func JoinParams(params []string) string

func PlainScalaType

func PlainScalaType(typ string) string

func ScalaType

func ScalaType(typ *spec.TypeDef) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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