workspace

package
v0.1.0-alpha.73 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Relative

func Relative(path string) string

func Resolve

func Resolve(baseDir, path string) string

Resolve converts a path to absolute, resolving it relative to baseDir if it's not already absolute

Types

type Config

type Config struct {
	Project         string
	OpenAPISpec     string
	StainlessConfig string
	Targets         map[stainless.Target]*TargetConfig

	ConfigPath string
}

Config stores workspace-level configuration with absolute paths

func NewConfig

func NewConfig(projectName, openAPISpecPath, stainlessConfigPath string) (Config, error)

func (*Config) Find

func (config *Config) Find() (bool, error)

Find searches for a stainless-workspace.json file starting from the current directory and moving up to parent directories until found or root is reached

func (*Config) Load

func (config *Config) Load(configPath string) error

func (*Config) Save

func (config *Config) Save() error

type ConfigExport

type ConfigExport struct {
	Project         string                             `json:"project"`
	OpenAPISpec     string                             `json:"openapi_spec,omitempty"`
	StainlessConfig string                             `json:"stainless_config,omitempty"`
	Targets         map[stainless.Target]*TargetConfig `json:"targets,omitempty"`
}

ConfigExport represents the on-disk format with relative paths

type TargetConfig

type TargetConfig struct {
	OutputPath string `json:"output_path"`
}

TargetConfig stores configuration for a specific SDK target

Jump to

Keyboard shortcuts

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