openapits

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidArtifact = errors.New("invalid openapi types artifact")

ErrInvalidArtifact reports an unusable OpenAPI TypeScript generation artifact.

View Source
var ErrMissingGeneratedFile = errors.New("generated file is missing")

ErrMissingGeneratedFile reports that the committed generated file does not exist.

View Source
var ErrStaleGeneratedFile = errors.New("generated file is stale")

ErrStaleGeneratedFile reports that the committed generated file no longer matches the source spec.

Functions

func Check

func Check(ctx context.Context, artifact Artifact) (err error)

Check regenerates one artifact into a temporary file and fails when the checked-in output differs.

func Generate

func Generate(ctx context.Context, artifact Artifact) error

Generate runs openapi-typescript for one artifact and formats the generated output with oxfmt.

Types

type Artifact

type Artifact struct {
	SpecPath   string
	OutputPath string
}

Artifact describes one checked-in OpenAPI document and its generated type output.

Jump to

Keyboard shortcuts

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