Skip to content

Commit b8293dc

Browse files
fix: fix generated flag types and value wrapping
1 parent f62abc2 commit b8293dc

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

pkg/cmd/build.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ var buildsCreate = cli.Command{
113113
Usage: "Optional commit message to use when creating a new commit.",
114114
BodyPath: "commit_message",
115115
},
116-
&requestflag.Flag[any]{
116+
&requestflag.Flag[map[string]string]{
117117
Name: "target-commit-messages",
118118
Usage: "Optional commit messages to use for each SDK when making a new commit.\nSDKs not represented in this object will fallback to the optional\n`commit_message` parameter, or will fallback further to the default\ncommit message.",
119119
BodyPath: "target_commit_messages",
@@ -184,12 +184,12 @@ var buildsCompare = cli.Command{
184184
Name: "compare",
185185
Usage: "Create two builds whose outputs can be directly compared with each other.",
186186
Flags: []cli.Flag{
187-
&requestflag.Flag[any]{
187+
&requestflag.Flag[map[string]any]{
188188
Name: "base",
189189
Usage: "Parameters for the base build",
190190
BodyPath: "base",
191191
},
192-
&requestflag.Flag[any]{
192+
&requestflag.Flag[map[string]any]{
193193
Name: "head",
194194
Usage: "Parameters for the head build",
195195
BodyPath: "head",

pkg/cmd/cmdutil.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func getDefaultRequestOptions(cmd *cli.Command) []option.RequestOption {
4848
case "staging":
4949
opts = append(opts, option.WithEnvironmentStaging())
5050
default:
51-
log.Fatalf("Unknown environment: %s. Valid environments are: production, staging", environment)
51+
log.Fatalf("Unknown environment: %s. Valid environments are %s", environment, "production, staging")
5252
}
5353
}
5454

pkg/cmd/project.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var projectsCreate = cli.Command{
2929
Usage: "Organization name",
3030
BodyPath: "org",
3131
},
32-
&requestflag.Flag[any]{
32+
&requestflag.Flag[map[string]map[string]string]{
3333
Name: "revision",
3434
Usage: "File contents to commit",
3535
BodyPath: "revision",
@@ -149,7 +149,7 @@ func handleProjectsRetrieve(ctx context.Context, cmd *cli.Command) error {
149149
}
150150

151151
params := stainless.ProjectGetParams{
152-
Project: stainless.Opt(cmd.Value("project").(string)),
152+
Project: stainless.String(cmd.Value("project").(string)),
153153
}
154154

155155
options, err := flagOptions(
@@ -185,7 +185,7 @@ func handleProjectsUpdate(ctx context.Context, cmd *cli.Command) error {
185185
}
186186

187187
params := stainless.ProjectUpdateParams{
188-
Project: stainless.Opt(cmd.Value("project").(string)),
188+
Project: stainless.String(cmd.Value("project").(string)),
189189
}
190190

191191
options, err := flagOptions(

pkg/cmd/projectbranch.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func handleProjectsBranchesCreate(ctx context.Context, cmd *cli.Command) error {
153153
}
154154

155155
params := stainless.ProjectBranchNewParams{
156-
Project: stainless.Opt(cmd.Value("project").(string)),
156+
Project: stainless.String(cmd.Value("project").(string)),
157157
}
158158

159159
options, err := flagOptions(
@@ -192,7 +192,7 @@ func handleProjectsBranchesRetrieve(ctx context.Context, cmd *cli.Command) error
192192
}
193193

194194
params := stainless.ProjectBranchGetParams{
195-
Project: stainless.Opt(cmd.Value("project").(string)),
195+
Project: stainless.String(cmd.Value("project").(string)),
196196
}
197197

198198
options, err := flagOptions(
@@ -233,7 +233,7 @@ func handleProjectsBranchesList(ctx context.Context, cmd *cli.Command) error {
233233
}
234234

235235
params := stainless.ProjectBranchListParams{
236-
Project: stainless.Opt(cmd.Value("project").(string)),
236+
Project: stainless.String(cmd.Value("project").(string)),
237237
}
238238

239239
options, err := flagOptions(
@@ -285,7 +285,7 @@ func handleProjectsBranchesDelete(ctx context.Context, cmd *cli.Command) error {
285285
}
286286

287287
params := stainless.ProjectBranchDeleteParams{
288-
Project: stainless.Opt(cmd.Value("project").(string)),
288+
Project: stainless.String(cmd.Value("project").(string)),
289289
}
290290

291291
options, err := flagOptions(
@@ -329,7 +329,7 @@ func handleProjectsBranchesRebase(ctx context.Context, cmd *cli.Command) error {
329329
}
330330

331331
params := stainless.ProjectBranchRebaseParams{
332-
Project: stainless.Opt(cmd.Value("project").(string)),
332+
Project: stainless.String(cmd.Value("project").(string)),
333333
}
334334

335335
options, err := flagOptions(
@@ -373,7 +373,7 @@ func handleProjectsBranchesReset(ctx context.Context, cmd *cli.Command) error {
373373
}
374374

375375
params := stainless.ProjectBranchResetParams{
376-
Project: stainless.Opt(cmd.Value("project").(string)),
376+
Project: stainless.String(cmd.Value("project").(string)),
377377
}
378378

379379
options, err := flagOptions(

pkg/cmd/projectconfig.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func handleProjectsConfigsRetrieve(ctx context.Context, cmd *cli.Command) error
7373
}
7474

7575
params := stainless.ProjectConfigGetParams{
76-
Project: stainless.Opt(cmd.Value("project").(string)),
76+
Project: stainless.String(cmd.Value("project").(string)),
7777
}
7878

7979
options, err := flagOptions(
@@ -109,7 +109,7 @@ func handleProjectsConfigsGuess(ctx context.Context, cmd *cli.Command) error {
109109
}
110110

111111
params := stainless.ProjectConfigGuessParams{
112-
Project: stainless.Opt(cmd.Value("project").(string)),
112+
Project: stainless.String(cmd.Value("project").(string)),
113113
}
114114

115115
options, err := flagOptions(

0 commit comments

Comments
 (0)