op

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoContent

type NoContent struct{}

NoContent is used as the type parameter for RequestBody or Response when there is no content body.

func (NoContent) NoContent

func (NoContent) NoContent()

type Option

type Option func(*v3.Operation, *store.Store)

Option configures an OpenAPI operation.

func Callback

func Callback(name string, opts ...callback.Option) Option

Callback adds a named callback to the operation.

func CookieParam

func CookieParam[T any](name string, opts ...param.Option) Option

CookieParam adds an optional cookie parameter to the operation.

func Deprecated

func Deprecated() Option

Deprecated marks the operation as deprecated. Default: not deprecated.

func Description

func Description(s string) Option

Description sets the operation description.

func ExternalDocs

func ExternalDocs(url, description string) Option

ExternalDocs sets an external documentation link for the operation.

func HeaderParam

func HeaderParam[T any](name string, opts ...param.Option) Option

HeaderParam adds an optional header parameter to the operation.

func OperationId

func OperationId(id string) Option

OperationId sets the unique operation identifier.

func Options

func Options(opts ...Option) Option

Options combines multiple options into one.

func PathParam

func PathParam[T any](name string, opts ...param.Option) Option

PathParam adds a required path parameter to the operation.

func QueryParam

func QueryParam[T any](name string, opts ...param.Option) Option

QueryParam adds an optional query parameter to the operation.

func RequestBody

func RequestBody[T any](opts ...body.Option) Option

RequestBody sets the request body for the operation.

func Response

func Response[T any](status int, opts ...resp.Option) Option

Response sets the response for the given HTTP status code. The description defaults to the HTTP status text.

func Security

func Security(name string, scopes ...string) Option

Security appends a security requirement to the operation. Pass an empty name to add an empty requirement (makes security optional for this operation).

func Server

func Server(url, description string) Option

Server adds a server override for this specific operation.

func Summary

func Summary(s string) Option

Summary sets a short summary of the operation.

func Tags

func Tags(tags ...string) Option

Tags applies tags to the operation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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