header

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	// contains filtered or unexported fields
}

func NewHeader

func NewHeader() *Header

func (*Header) Add

func (h *Header) Add(k string, v Map) *Header

func (*Header) Components

func (h *Header) Components(gen *openapi3gen.Generator) (components openapi3.Components, err error)

Components returns openapi3.Components with the value of following fields: * openapi3.Schemas * openapi3.Headers * openapi3.Parameters

func (*Header) RespHeaderRef

func (h *Header) RespHeaderRef() (refHeader map[string]string)

RespHeaderRef returns header actual key name as the map key, and string of referenced header as the value. Components must be called before call this function, otherwise this will return empty map.

type Map

type Map struct {
	Value       string
	Description string
	Required    bool
}

Jump to

Keyboard shortcuts

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