response

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildResponse

func BuildResponse(comments in.SwagifyComment) map[string]Response
go-swagify

@@response: <name or status code> @@ref: (optional) schema reference @@desc: (required, if @@ref not used) @@content_name: (not required if @@ref is used, else optional) application/json, etc @@content_ref: (not required if @@ref is used, else optional) schema reference ... can repeat @@content_*

func ParseOperationResponseLines

func ParseOperationResponseLines(lines []string) map[string]Response

called by operation

Types

type Content

type Content struct {
	RefSchema `json:"schema" yaml:"schema"`
}

type RefSchema

type RefSchema struct {
	Ref string `json:"$ref" yaml:"$ref"`
}

type Response

type Response struct {
	Ref         string             `json:"$ref,omitempty" yaml:"$ref,omitempty"`
	Description string             `json:"description,omitempty" yaml:"description,omitempty"`
	Content     map[string]Content `json:"content,omitempty" yaml:"content,omitempty"`
}

Jump to

Keyboard shortcuts

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