codegen

package
v0.0.0-...-ce83e3f Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCapnp

func GenerateCapnp(apiDef *raml.APIDefinition, dir, lang, pkg string) error

GenerateCapnp generates capnp schema from RAML specs

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 {

func GenerateDocs

func GenerateDocs(apiDef *raml.APIDefinition, format, output string) error

GenerateDocs generate markdown docs from RAML specs

func GeneratePythonCapnp

func GeneratePythonCapnp(apiDef *raml.APIDefinition, dir string) 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
Code generated for package apidocs by go-bindata DO NOT EDIT.
Code generated for package apidocs by go-bindata DO NOT EDIT.
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