Goruda is Golang CLI App to convert OpenAPI 3 Specifications into simple boilerplate code.

This app is created because the process of creating boilerplate HTTP server in Go is repetitive, so in order to reduce that kind of work, Goruda will read all your OpenAPI 3 specifications and convert it into simple running HTTP Server.


  • Go at least ver. 1.11
  • Working OpenAPI 3 File

How to Run

~ make build
~ ./goruda generate [path_to_openapi_file]
Expand ▾ Collapse ▴




This section is empty.


This section is empty.


func LoadSwaggerFile

func LoadSwaggerFile(swaggerFile string) *openapi3.Swagger


type AbstractionData

type AbstractionData struct {
	TimeStamp   time.Time
	PackageName string
	Name        string
	Methods     map[string]ListOfAttributes

type Attribute

type Attribute struct {
	Name       string
	Type       string
	IsRequired bool

func (Attribute) GetBitNumber

func (a Attribute) GetBitNumber() string

func (Attribute) IsCustomType

func (a Attribute) IsCustomType() bool

func (Attribute) IsFloat

func (a Attribute) IsFloat() bool

func (Attribute) IsInteger

func (a Attribute) IsInteger() bool

type Attributes

type Attributes []Attribute

func (Attributes) GetLastIndex

func (a Attributes) GetLastIndex() int

type DomainData

type DomainData struct {
	StructName  string
	TimeStamp   time.Time
	Attributes  []Attribute
	Imports     map[string]Import
	Packagename string
	IsPolymorph bool
	SliceData   SliceData

type Goruda

type Goruda struct {
	PackageName     string
	TargetDirectory string

func (Goruda) Generate

func (g Goruda) Generate(swaggerFile string) error

type HTTPData

type HTTPData struct {
	TimeStamp   time.Time
	PackageName string
	ServiceName string
	Methods     map[string]HTTPMethods

type HTTPMethods

type HTTPMethods struct {
	Path        string
	MethodsName string
	Data        ListOfAttributes

type Import

type Import struct {
	Alias string
	Path  string

type ListOfAttributes

type ListOfAttributes struct {
	Attributes  Attributes
	ReturnValue Attributes

type SliceData

type SliceData struct {
	Type string


Path Synopsis