operation

package
v0.0.0-...-c71d033 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildOperations

func BuildOperations(comments in.SwagifyComment) map[string]OperationBuild
go-swagify

@@operation: <path url> @@method: get|put|post|delete|options|head|patch|trace @@summary: (optional) @@description: (optional) @@parameters.ref: (optional) semicolon(;) list of ref parameter names @@resp_name: (required) 200, 300, 4xx, etc @@resp_ref: (required) name of the response reference ... @@resp_name, resp_ref can repeat

Types

type Operation

type Operation struct {
	Summary     string             `json:"summary,omitempty" yaml:"summary,omitempty"`
	Description string             `json:"description,omitempty" yaml:"description,omitempty"`
	Tags        []string           `json:"tags,omitempty" yaml:"tags,omitempty"`
	Parameters  []par.ParameterRef `json:"parameters,omitempty" yaml:"parameters,omitempty"`
	RequestBody req.ReqSchema      `json:"requestBody,omitempty" yaml:"requestBody,omitempty"`
	// Servers     []srv.Server    `json:"servers" yaml:"servers"`
	Response map[string]res.Response `json:"responses,omitempty" yaml:"responses,omitempty"`
}

type OperationBuild

type OperationBuild struct {
	Operations map[string]Operation
}

helper struct

Jump to

Keyboard shortcuts

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