Skip to content

Commit 5455b49

Browse files
feat: support disabling codeSamples (#1633)
1 parent d667227 commit 5455b49

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ require (
4040
github.com/speakeasy-api/openapi v1.7.3
4141
github.com/speakeasy-api/openapi-generation/v2 v2.716.10
4242
github.com/speakeasy-api/openapi-overlay v0.10.3
43-
github.com/speakeasy-api/sdk-gen-config v1.33.0
43+
github.com/speakeasy-api/sdk-gen-config v1.34.0
4444
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.26.7
4545
github.com/speakeasy-api/speakeasy-core v0.20.9
4646
github.com/speakeasy-api/versioning-reports v0.6.1

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,8 @@ github.com/speakeasy-api/openapi-overlay v0.10.3 h1:70een4vwHyslIp796vM+ox6VISCl
547547
github.com/speakeasy-api/openapi-overlay v0.10.3/go.mod h1:RJjV0jbUHqXLS0/Mxv5XE7LAnJHqHw+01RDdpoGqiyY=
548548
github.com/speakeasy-api/sdk-gen-config v1.33.0 h1:3aBd3aiwtH+t/Yj2AsGpHg/AD/80WATMqJNPErVZjbY=
549549
github.com/speakeasy-api/sdk-gen-config v1.33.0/go.mod h1:2KSnHvP6SxS/NFBddH9B+SrcopPyY8MsDlW1kiG9Pqs=
550+
github.com/speakeasy-api/sdk-gen-config v1.34.0 h1:KSAmSBTApmwq4wrgqVG6KvgcqYM67tXUYon9VlLvyyc=
551+
github.com/speakeasy-api/sdk-gen-config v1.34.0/go.mod h1:2KSnHvP6SxS/NFBddH9B+SrcopPyY8MsDlW1kiG9Pqs=
550552
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.26.7 h1:SoWZkRlpFlv8qibCfXWrBZay1JeLS9uqJ+1cu+DFgXo=
551553
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.26.7/go.mod h1:k9JD6Rj0+Iizc5COoLZHyRIOGGITpKZ2qBuFFO8SqNI=
552554
github.com/speakeasy-api/speakeasy-core v0.20.9 h1:khs1KjvQ1Ery5tJulDL/jCphsGrFq4TJpt0no9lY760=

internal/run/target.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func (w *Workflow) runTarget(ctx context.Context, target string) (*SourceResult,
236236
log.From(ctx).Warnf("Compilation was skipped. The generated SDK may not be ready for use without manual compilation. To enable compilation DO NOT pass the --skip-compile flag.")
237237
}
238238

239-
if t.CodeSamples != nil {
239+
if t.CodeSamplesEnabled() {
240240
codeSamplesStep := rootStep.NewSubstep("Generating Code Samples")
241241
namespaceName, digest, err := w.runCodeSamples(ctx, codeSamplesStep, *t.CodeSamples, t.Target, sourcePath, t.Output)
242242
if err != nil {

0 commit comments

Comments
 (0)