codegen

package
v0.0.0-...-4799e85 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateClient

func GenerateClient(apiDef *raml.APIDefinition, conf ClientConfig) error

GenerateClient generates client library func GenerateClient(apiDef *raml.APIDefinition, dir, packageName, lang, rootImportPath, kind string,

libRootURLs []string, pythonUnnmarshallResponse bool) error {

Types

type ClientConfig

type ClientConfig struct {
	Dir                      string
	PackageName              string
	Lang                     string
	RootImportPath           string
	Kind                     string
	LibRootURLs              []string
	PythonUnmarshallResponse bool
}

ClientConfig represents client's config

type Command

type Command interface {
	//Execute the command
	Execute() error
}

Command is a toplevel command to be executed by the cli's main routine

type Server

type Server struct {
	RAMLFile         string
	Dir              string // Destination directory
	PackageName      string
	Lang             string
	APIDocsDir       string // API Docs directory
	RootImportPath   string
	WithMain         bool   // true if we also generate main file
	Kind             string // currently only used by python client : sanic/flask
	APIFilePerMethod bool   // true if we want to generate one API file per API method
	LibRootURLs      []string
}

Server represents server code

func (*Server) Generate

func (s *Server) Generate() error

Generate generates API server files

Directories

Path Synopsis
Package date provides implementation of various RAML Date type.
Package date provides implementation of various RAML Date type.

Jump to

Keyboard shortcuts

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