response

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Implementation

type Implementation struct {
	Default ResponseImplementation
	PerCode *map[uint16]ResponseImplementation
}

User-provided metadata containing information on the implementation to be converted to OpenAPI spec.

type Reference

type Reference shared.Reference

A reference to a Component.

func Ref

func Ref(to string) Reference

type Response

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

func FromResponseImplementation

func FromResponseImplementation(impl ResponseImplementation) (Response, error)

type ResponseImplementation

type ResponseImplementation struct {
	Description string
	Headers     *map[string]header.Implementation
	Content     *map[string]media.Implementation
	Links       *map[string]link.Implementation
}

type Responses

type Responses struct {
	Default Response             `json:"default"`
	PerCode *map[uint16]Response `json:"-,omitempty" flatten:""`
}

func FromImplementation

func FromImplementation(impl Implementation) (Responses, error)

func (Responses) MarshalJSON

func (r Responses) MarshalJSON() ([]byte, error)

type Spec

type Spec struct {
	Description string                    `json:"description"`
	Headers     *map[string]header.Header `json:"headers,omitempty"`
	Content     *map[string]media.Type    `json:"content,omitempty"`
	Links       *map[string]link.Link     `json:"links,omitempty"`
}

Jump to

Keyboard shortcuts

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