domain

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseOperation

func ParseOperation(op *Operation) *openapi3.Operation

ParseOperation converts your custom Operation struct to openapi3.Operation.

func ParsePathItem

func ParsePathItem(item PathItem) openapi3.PathItem

Types

type MediaType

type MediaType struct {
	Schema *SchemaRef
}

type Operation

type Operation struct {
	Tags        []string
	OperationID string
	Description string
	Deprecated  bool
	Parameters  Parameters
	RequestBody *RequestBodyRef
	Responses   map[string]*ResponseRef
}

type Parameter

type Parameter struct {
	Name        string
	In          string
	Description string
	Example     any
	Required    bool
	Schema      *SchemaRef
}

type ParameterRef

type ParameterRef struct {
	Ref   string
	Value *Parameter
}

type Parameters

type Parameters []ParameterRef

type ParsedPath

type ParsedPath struct {
	Path string
	Item openapi3.PathItem
}

type Path

type Path struct {
	Path string
	Item PathItem
}

func (*Path) Parse

func (p *Path) Parse() ParsedPath

type PathItem

type PathItem struct {
	Get    *Operation
	Post   *Operation
	Delete *Operation
	Put    *Operation
}

type RequestBody

type RequestBody struct {
	Description string
	Required    bool
	Content     map[string]*MediaType
}

type RequestBodyRef

type RequestBodyRef struct {
	Ref   string
	Value *RequestBody
}

type Response

type Response struct {
	Description *string
	Content     map[string]*MediaType
}

type ResponseRef

type ResponseRef struct {
	Ref   string
	Value *Response
}

type Schema

type Schema struct {
	Type        string
	Enum        []any
	Properties  Schemas
	Items       *SchemaRef
	Description string
	Pattern     string
	Default     any
	Example     any
}

type SchemaRef

type SchemaRef struct {
	Ref   string
	Value *Schema
}

func NewSchemaRef

func NewSchemaRef(ref string, value *Schema) *SchemaRef

type Schemas

type Schemas map[string]*SchemaRef

Jump to

Keyboard shortcuts

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