docs

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOpenApiDoc

func CreateOpenApiDoc(fileName string) error

func GenerateOpenAPI

func GenerateOpenAPI() ([]byte, error)

func RegisterApi

func RegisterApi(api ApiWrapper)

Types

type ApiParameter

type ApiParameter struct {
	Name        string `json:"name"`
	In          string `json:"in"` // e.g., "query", "path", "header", "cookie"
	Description string `json:"description,omitempty"`
	Required    bool   `json:"required,omitempty"`
}

type ApiRequestBody

type ApiRequestBody struct {
	Description string      `json:"description,omitempty"`
	Content     interface{} `json:"content,omitempty"`
}

type ApiResponse

type ApiResponse struct {
	Description string      `json:"description,omitempty"`
	Content     interface{} `json:"content,omitempty"`
}

Response represents the response structure for an API

type ApiWrapper

type ApiWrapper struct {
	Path                 string          `json:"path"`
	Method               string          `json:"method"`
	Name                 string          `json:"name"`
	Description          string          `json:"description"`
	Tags                 []string        `json:"tags,omitempty"`
	RequestBody          *ApiRequestBody `json:"requestBody,omitempty"`
	Response             *ApiResponse    `json:"response,omitempty"`
	Parameters           []ApiParameter  `json:"parameters,omitempty"`
	UnAuthenticated      bool            `json:"unauthenticated,omitempty"`
	ProjectIDNotRequired bool            `json:"projectIdNotRequired,omitempty"`
}

Jump to

Keyboard shortcuts

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