apidoc

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocList

func DocList(w http.ResponseWriter, r *http.Request)

func GenOpenapi added in v1.8.3

func GenOpenapi(api *pick.ApiInfo, doc *openapi3.T, methodType reflect.Type, tag, dec string)

func Markdown

func Markdown(filePath, modName string)

有swagger,有没有必要做

func Openapi added in v1.8.3

func Openapi(filePath, modName string)

func RegisterApiInfo

func RegisterApiInfo(apiInfo *GroupApiInfo)

Types

type ApiDocInfo

type ApiDocInfo struct {
	ApiInfo *pick.ApiInfo
	Method  reflect.Type
}

type GroupApiInfo

type GroupApiInfo struct {
	Describe string
	Infos    []*ApiDocInfo
}

type PMApi

type PMApi struct {
	Name                    string                    `json:"name"`
	ProtocolProfileBehavior PMProtocolProfileBehavior `json:"protocolProfileBehavior"`
	Request                 PMRequest                 `json:"request"`
	Response                []interface{}             `json:"response"`
}

type PMBody

type PMBody struct {
	Mode string `json:"mode"`
	Raw  string `json:"raw"`
}

type PMCategory

type PMCategory struct {
	Name                    string                    `json:"name"`
	ProtocolProfileBehavior PMProtocolProfileBehavior `json:"protocolProfileBehavior"`
	Items                   []PMApi                   `json:"item"`
}

type PMFile

type PMFile struct {
	Info  PMInfo       `json:"info"`
	Items []PMCategory `json:"item"`
}

type PMHeader

type PMHeader struct {
	Key     string `json:"key"`
	Value   string `json:"value"`
	Type    string `json:"type"`
	Disable bool   `json:"disable"`
}

TODO

type PMInfo

type PMInfo struct {
	PostManId string `json:"_postman_id"`
	Name      string `json:"name"`
	Schema    string `json:"schema"`
}

type PMProtocolProfileBehavior

type PMProtocolProfileBehavior struct {
	DisableBodyPruning bool `json:"disableBodyPruning"`
}

type PMQuery

type PMQuery struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type PMRequest

type PMRequest struct {
	Method      string     `json:"method"`
	Header      []PMHeader `json:"header"`
	Body        PMBody     `json:"body"`
	Description string     `json:"description"`
	URL         PMUrl      `json:"url"`
}

type PMUrl

type PMUrl struct {
	Raw      string    `json:"raw"`
	Protocol string    `json:"protocol"`
	Host     []string  `json:"host"`
	Path     []string  `json:"path"`
	Query    []PMQuery `json:"query"`
}

type ParamTable

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

Jump to

Keyboard shortcuts

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