openapi

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CACHE_SERVER_SUBDIR = "server"
	CACHE_CLIENT_SUBDIR = "client"
	SERVER_PACKAGE_NAME = "openapi"

	FILE_TIME_FILENAME     = ".timestamps.yaml"
	GENERATED_API_FILENAME = "api_generated.yaml"
)
View Source
const (
	CLIENTS_FILENAME = ".clients.yaml"
)
View Source
const (
	GENERATION_META_FILENAME = "generation_metadata.yaml"
)

Variables

This section is empty.

Functions

func MakeClientEnvName

func MakeClientEnvName(serviceName string) string

Types

type GenerationMeta added in v0.1.7

type GenerationMeta struct {
	MifyVersion string `yaml:"mify_version"`
}

type OpenAPIGenerator

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

func NewOpenAPIGenerator

func NewOpenAPIGenerator(ctx *gencontext.GenContext) (OpenAPIGenerator, error)

func (*OpenAPIGenerator) GenerateClient

func (g *OpenAPIGenerator) GenerateClient(ctx *gencontext.GenContext, clientName string) error

func (*OpenAPIGenerator) GenerateServer

func (g *OpenAPIGenerator) GenerateServer(ctx *gencontext.GenContext) error

func (*OpenAPIGenerator) NeedGenerateClient

func (g *OpenAPIGenerator) NeedGenerateClient(ctx *gencontext.GenContext, schemaRelDir string) (bool, error)

func (*OpenAPIGenerator) NeedGenerateServer

func (g *OpenAPIGenerator) NeedGenerateServer(ctx *gencontext.GenContext, schemaRelDir string) (bool, error)

func (*OpenAPIGenerator) Prepare

func (g *OpenAPIGenerator) Prepare(ctx *gencontext.GenContext) error

func (*OpenAPIGenerator) PrepareSync

func (g *OpenAPIGenerator) PrepareSync(ctx *gencontext.GenContext) error

func (*OpenAPIGenerator) RemoveClient

func (g *OpenAPIGenerator) RemoveClient(ctx *gencontext.GenContext, clientName string) error

type OpenAPIGeneratorInfo

type OpenAPIGeneratorInfo struct {
	GitHost       string
	GitNamespace  string
	GitRepository string
	GoModule      string
	ServiceName   string
}

type OpenAPIGeneratorMode

type OpenAPIGeneratorMode int16
const (
	Server OpenAPIGeneratorMode = iota
	Client
)

type OpenapiStep

type OpenapiStep struct {
}

func NewOpenapiStep

func NewOpenapiStep() OpenapiStep

func (OpenapiStep) Execute

func (OpenapiStep) Name

func (s OpenapiStep) Name() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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