Skip to content

Commit f4d71d2

Browse files
feat(api): change v0 path param projectName -> project
1 parent f4efef2 commit f4d71d2

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 15
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-475d7467c6365b48df46bee77ff6a07d22601f7c3a269a0383473e4ebce1146d.yml
3-
openapi_spec_hash: 4b9f1b89f983978e970133b5653fd0d8
4-
config_hash: 28c1ddd1e9bdba67e018459acdfafc5b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-cfef2e882e091dad51a5b53bc39cc251ecf3f71cc0328561cec6309e8bbac93a.yml
3+
openapi_spec_hash: fac1531252a5b791107de8257fdcf3cb
4+
config_hash: e269922aeded8aadd211a0da29d10519

project.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var projectsRetrieve = cli.Command{
1717
Usage: "Retrieve a project by name",
1818
Flags: []cli.Flag{
1919
&cli.StringFlag{
20-
Name: "project-name",
20+
Name: "project",
2121
},
2222
},
2323
Before: initAPICommand,
@@ -30,7 +30,7 @@ var projectsUpdate = cli.Command{
3030
Usage: "Update a project's properties",
3131
Flags: []cli.Flag{
3232
&cli.StringFlag{
33-
Name: "project-name",
33+
Name: "project",
3434
},
3535
&cli.StringFlag{
3636
Name: "display-name",
@@ -69,7 +69,7 @@ func handleProjectsRetrieve(ctx context.Context, cmd *cli.Command) error {
6969

7070
res, err := cc.client.Projects.Get(
7171
context.TODO(),
72-
cmd.Value("project-name").(string),
72+
cmd.Value("project").(string),
7373
option.WithMiddleware(cc.AsMiddleware()),
7474
)
7575
if err != nil {
@@ -85,7 +85,7 @@ func handleProjectsUpdate(ctx context.Context, cmd *cli.Command) error {
8585

8686
res, err := cc.client.Projects.Update(
8787
context.TODO(),
88-
cmd.Value("project-name").(string),
88+
cmd.Value("project").(string),
8989
stainlessv0.ProjectUpdateParams{},
9090
option.WithMiddleware(cc.AsMiddleware()),
9191
option.WithRequestBody("application/json", cc.body),

projectsnippet.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ var projectsSnippetsCreateRequest = cli.Command{
1919
&cli.StringFlag{
2020
Name: "project-name",
2121
},
22-
&cli.StringFlag{
23-
Name: "language",
24-
Action: getAPIFlagAction[string]("body", "language"),
25-
},
2622
&cli.StringFlag{
2723
Name: "request.method",
2824
Action: getAPIFlagAction[string]("body", "request.method"),
@@ -51,6 +47,14 @@ var projectsSnippetsCreateRequest = cli.Command{
5147
Name: "request.body.filePath",
5248
Action: getAPIFlagAction[string]("body", "request.body.filePath"),
5349
},
50+
&cli.BoolFlag{
51+
Name: "har",
52+
Action: getAPIFlagActionWithValue[bool]("body", "har", nil),
53+
},
54+
&cli.StringFlag{
55+
Name: "language",
56+
Action: getAPIFlagAction[string]("body", "language"),
57+
},
5458
&cli.StringFlag{
5559
Name: "version",
5660
Action: getAPIFlagAction[string]("body", "version"),

0 commit comments

Comments
 (0)