request

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reference

type Reference shared.Reference

A reference to a Component.

func Ref

func Ref(to string) Reference

type Request

type Request interface {
	// contains filtered or unexported methods
}

func FromField

func FromField(from reflect.StructField) (Request, error)

type Spec

type Spec struct {
	// A brief description of the request body. This could contain examples of use. [CommonMark] syntax MAY be used for rich text representation.
	Description *string `json:"description,omitempty"`
	Required    bool    `json:"required"`

	// The content of the request body. The key is a media type or media type range, see [RFC7231] Appendix D, and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. "text/plain" overrides "text/*"
	Content map[string]media.Type `json:"content"`
}

Jump to

Keyboard shortcuts

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