fw_openapi

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 10 Imported by: 0

README

fw_openapi

generate openapi documents from linxlib/astp

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAPI

type OpenAPI struct {
	*spec.Extendable[spec.OpenAPI]
	// contains filtered or unexported fields
}

func NewOpenAPIFromFWServer

func NewOpenAPIFromFWServer(s *fw.Server, fileName string) *OpenAPI

func (*OpenAPI) AddObjectSchama added in v0.1.0

func (oa *OpenAPI) AddObjectSchama(field *astp.Element, prop *spec.RefOrSpec[spec.Schema], tag string) *spec.RefOrSpec[spec.Schema]

func (*OpenAPI) AddResponse added in v0.0.8

func (oa *OpenAPI) AddResponse(op *spec.Extendable[spec.Operation], code string, resp *spec.RefOrSpec[spec.Extendable[spec.Response]])

func (*OpenAPI) HandleServerInfo

func (oa *OpenAPI) HandleServerInfo(si []string)

func (*OpenAPI) HandleStructs

func (oa *OpenAPI) HandleStructs(ctl *astp.Element)

func (*OpenAPI) Log added in v0.0.9

func (oa *OpenAPI) Log(t string, msg string)

func (*OpenAPI) NewEnumSchema added in v0.1.0

func (oa *OpenAPI) NewEnumSchema(v string) *spec.RefOrSpec[spec.Schema]

func (*OpenAPI) NewObjectResponse added in v0.0.8

func (oa *OpenAPI) NewObjectResponse(schemaName string, desc string, contentType string) *spec.RefOrSpec[spec.Extendable[spec.Response]]

func (*OpenAPI) NewObjectSchema added in v0.0.8

func (oa *OpenAPI) NewObjectSchema(comment string) *spec.RefOrSpec[spec.Schema]

func (*OpenAPI) NewProp added in v0.0.8

func (oa *OpenAPI) NewProp(field *astp.Element) (*spec.RefOrSpec[spec.Schema], bool)

func (*OpenAPI) NewResponse added in v0.0.8

func (oa *OpenAPI) NewResponse(desc string, v string, contentType string) *spec.RefOrSpec[spec.Extendable[spec.Response]]

func (*OpenAPI) NewSimpleParam added in v0.0.9

func (oa *OpenAPI) NewSimpleParam(element *astp.Element, tag string) *spec.RefOrSpec[spec.Extendable[spec.Parameter]]

func (*OpenAPI) NewStringResponse added in v0.0.8

func (oa *OpenAPI) NewStringResponse(desc string, contentType string) *spec.RefOrSpec[spec.Extendable[spec.Response]]

func (*OpenAPI) Print

func (oa *OpenAPI) Print(slot string)

func (*OpenAPI) WriteOut

func (oa *OpenAPI) WriteOut(file string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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