requestBody

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 BuildRequestBody

func BuildRequestBody(comments in.SwagifyComment) map[string]RequestBody
go-swagify

@@requestBody: <name or status code> @@ref: (optional) schema reference @@desc: (required, if @@ref not used) @@required: (optional) true/false @@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

Types

type Content

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

type ReqSchema

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

type RequestBody

type RequestBody struct {
	Ref         string             `json:"$ref,omitempty" yaml:"$ref,omitempty"`
	Description string             `json:"description,omitempty" yaml:"description,omitempty"`
	Required    bool               `json:"required,omitempty" yaml:"required,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