From 7970e984e4baad14438b39e147a6d117e137b0f5 Mon Sep 17 00:00:00 2001 From: Snider Date: Thu, 29 Jan 2026 01:24:37 +0000 Subject: [PATCH] feat(release): add SDK configuration to release.yaml Add SDKConfig struct and related types (SDKPackageConfig, SDKDiffConfig, SDKPublishConfig) to support SDK generation configuration within the release.yaml configuration file. Co-Authored-By: Claude Opus 4.5 --- pkg/release/config.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/pkg/release/config.go b/pkg/release/config.go index ac8053db..ae3d15b9 100644 --- a/pkg/release/config.go +++ b/pkg/release/config.go @@ -27,6 +27,8 @@ type Config struct { Publishers []PublisherConfig `yaml:"publishers"` // Changelog configures changelog generation. Changelog ChangelogConfig `yaml:"changelog"` + // SDK configures SDK generation. + SDK *SDKConfig `yaml:"sdk,omitempty"` // Internal fields (not serialized) projectDir string // Set by LoadConfig @@ -121,6 +123,40 @@ type OfficialConfig struct { Output string `yaml:"output,omitempty"` } +// SDKConfig holds SDK generation configuration. +type SDKConfig struct { + // Spec is the path to the OpenAPI spec file. + Spec string `yaml:"spec,omitempty"` + // Languages to generate. + Languages []string `yaml:"languages,omitempty"` + // Output directory (default: sdk/). + Output string `yaml:"output,omitempty"` + // Package naming. + Package SDKPackageConfig `yaml:"package,omitempty"` + // Diff configuration. + Diff SDKDiffConfig `yaml:"diff,omitempty"` + // Publish configuration. + Publish SDKPublishConfig `yaml:"publish,omitempty"` +} + +// SDKPackageConfig holds package naming configuration. +type SDKPackageConfig struct { + Name string `yaml:"name,omitempty"` + Version string `yaml:"version,omitempty"` +} + +// SDKDiffConfig holds diff configuration. +type SDKDiffConfig struct { + Enabled bool `yaml:"enabled,omitempty"` + FailOnBreaking bool `yaml:"fail_on_breaking,omitempty"` +} + +// SDKPublishConfig holds monorepo publish configuration. +type SDKPublishConfig struct { + Repo string `yaml:"repo,omitempty"` + Path string `yaml:"path,omitempty"` +} + // ChangelogConfig holds changelog generation settings. type ChangelogConfig struct { // Include specifies commit types to include in the changelog.