schema

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTypes

func AddTypes(swagger *openapi3.T, pkgs map[string]*ast.Package)

AddTypes walks parsed packages and emits component schemas for all struct types.

func CleanUnused

func CleanUnused(swagger *openapi3.T)

CleanUnused removes component schemas not referenced from operations (transitive closure).

func Finalize

func Finalize(swagger *openapi3.T)

Finalize adds common shared schemas and removes unused component schemas.

func NewDocument

func NewDocument(version string) *openapi3.T

NewDocument returns the base OpenAPI document used for OSS runtime generation.

func RefForAnnotation

func RefForAnnotation(typeName string) *openapi3.SchemaRef

RefForAnnotation maps @request / @response type strings (dots already converted to underscores) to either an inline schema or a #/components/schemas/… ref.

Types

This section is empty.

Jump to

Keyboard shortcuts

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