openapi

package
v1.0.1271 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Schemas embed.FS

Functions

func GenerateSchema added in v1.0.486

func GenerateSchema(obj any) ([]byte, error)

GenerateSchema reflects an object into JSON schema and enriches it with Go comments.

func GenerateSchemaWithCommentsFrom added in v1.0.1265

func GenerateSchemaWithCommentsFrom(obj any, commentsFrom string) ([]byte, error)

GenerateSchemaWithCommentsFrom reflects obj into JSON schema but loads Go doc comments from commentsFrom instead of obj's own package. Use this when the reflected object lives in a binary's main package (e.g. a code generator) but the schema should carry comments from a library package.

func ValidatePlaybookSpec added in v1.0.350

func ValidatePlaybookSpec(schema []byte) (error, error)

func ValidateSpec added in v1.0.350

func ValidateSpec(path string, schema []byte) (error, error)

func WriteSchemaToFile added in v1.0.486

func WriteSchemaToFile(path string, obj any) error

WriteSchemaToFile generates schema bytes for an object and writes them to disk.

Types

This section is empty.

Jump to

Keyboard shortcuts

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