openapits

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 12 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 CheckSDK

func CheckSDK(ctx context.Context, artifact SDKArtifact) error

CheckSDK rejects missing, changed, or obsolete generated SDK files.

func Generate

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

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

func GenerateSDK

func GenerateSDK(ctx context.Context, artifact SDKArtifact) error

GenerateSDK publishes the public resource SDK and internal stream bindings.

Types

type Artifact

type Artifact struct {
	SpecPath   string
	OutputPath string
}

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

type SDKArtifact

type SDKArtifact struct {
	SpecPath   string
	ConfigPath string
	OutputPath string
}

SDKArtifact describes the two generated SDK jobs and their shared source.

Jump to

Keyboard shortcuts

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