Skip to content

Commit 529d481

Browse files
authored
docs(account): reworked account api doc (#2866)
1 parent 11028db commit 529d481

10 files changed

+59
-59
lines changed

cmd/scw/testdata/test-all-usage-account-project-create-usage.golden

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Create project.
3+
Generate a new Project for an Organization, specifying its configuration including name and description.
44

55
USAGE:
66
scw account project create [arg=value ...]
77

88
ARGS:
9-
[name] The name of the project
10-
[description] The description of the project
9+
[name] Name of the Project
10+
[description] Description of the Project
1111
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
1212

1313
FLAGS:

cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Delete project.
3+
Delete an existing Project, specified by its Project ID. The Project needs to be empty (meaning there are no resources left in it) to be deleted effectively. Note that deleting a Project is permanent, and cannot be undone.
44

55
USAGE:
66
scw account project delete [arg=value ...]

cmd/scw/testdata/test-all-usage-account-project-get-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Get project.
3+
Retrieve information about an existing Project, specified by its Project ID. Its full details, including ID, name and description, are returned in the response object.
44

55
USAGE:
66
scw account project get [arg=value ...]

cmd/scw/testdata/test-all-usage-account-project-list-usage.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
List projects.
3+
List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names and IDs. Other information include the creation and update date of the Project.
44

55
USAGE:
66
scw account project list [arg=value ...]
77

88
ARGS:
9-
[name] The name of the project
10-
[order-by] The sort order of the returned projects (created_at_asc | created_at_desc | name_asc | name_desc)
11-
[project-ids.{index}] Filter out by a list of project ID
9+
[name] Name of the Project
10+
[order-by] Sort order of the returned Projects (created_at_asc | created_at_desc | name_asc | name_desc)
11+
[project-ids.{index}] Project IDs to filter for. The results will be limited to any Projects with an ID in this array
1212
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
1313

1414
FLAGS:

cmd/scw/testdata/test-all-usage-account-project-update-usage.golden

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Update project.
3+
Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.
44

55
USAGE:
66
scw account project update [arg=value ...]
77

88
ARGS:
99
[project-id] Project ID to use. If none is passed the default project ID will be used
10-
[name] The name of the project
11-
[description] The description of the project
10+
[name] Name of the Project
11+
[description] Description of the Project
1212

1313
FLAGS:
1414
-h, --help help for update

cmd/scw/testdata/test-all-usage-account-project-usage.golden

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ USAGE:
66
scw account project <command>
77

88
AVAILABLE COMMANDS:
9-
create Create project
10-
delete Delete project
11-
get Get project
12-
list List projects
13-
update Update project
9+
create Create a new Project for an Organization
10+
delete Delete an existing Project
11+
get Get an existing Project
12+
list List all Projects of an Organization
13+
update Update Project
1414

1515
FLAGS:
1616
-h, --help help for project

docs/commands/account.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
This API allows you to manage projects.
44

55
- [Project management commands](#project-management-commands)
6-
- [Create project](#create-project)
7-
- [Delete project](#delete-project)
8-
- [Get project](#get-project)
9-
- [List projects](#list-projects)
10-
- [Update project](#update-project)
6+
- [Create a new Project for an Organization](#create-a-new-project-for-an-organization)
7+
- [Delete an existing Project](#delete-an-existing-project)
8+
- [Get an existing Project](#get-an-existing-project)
9+
- [List all Projects of an Organization](#list-all-projects-of-an-organization)
10+
- [Update Project](#update-project)
1111

1212

1313
## Project management commands
1414

1515
Project management commands.
1616

1717

18-
### Create project
18+
### Create a new Project for an Organization
1919

20-
Create project.
20+
Generate a new Project for an Organization, specifying its configuration including name and description.
2121

2222
**Usage:**
2323

@@ -30,15 +30,15 @@ scw account project create [arg=value ...]
3030

3131
| Name | | Description |
3232
|------|---|-------------|
33-
| name | | The name of the project |
34-
| description | | The description of the project |
33+
| name | | Name of the Project |
34+
| description | | Description of the Project |
3535
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
3636

3737

3838

39-
### Delete project
39+
### Delete an existing Project
4040

41-
Delete project.
41+
Delete an existing Project, specified by its Project ID. The Project needs to be empty (meaning there are no resources left in it) to be deleted effectively. Note that deleting a Project is permanent, and cannot be undone.
4242

4343
**Usage:**
4444

@@ -55,9 +55,9 @@ scw account project delete [arg=value ...]
5555

5656

5757

58-
### Get project
58+
### Get an existing Project
5959

60-
Get project.
60+
Retrieve information about an existing Project, specified by its Project ID. Its full details, including ID, name and description, are returned in the response object.
6161

6262
**Usage:**
6363

@@ -74,9 +74,9 @@ scw account project get [arg=value ...]
7474

7575

7676

77-
### List projects
77+
### List all Projects of an Organization
7878

79-
List projects.
79+
List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names and IDs. Other information include the creation and update date of the Project.
8080

8181
**Usage:**
8282

@@ -89,16 +89,16 @@ scw account project list [arg=value ...]
8989

9090
| Name | | Description |
9191
|------|---|-------------|
92-
| name | | The name of the project |
93-
| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | The sort order of the returned projects |
94-
| project-ids.{index} | | Filter out by a list of project ID |
92+
| name | | Name of the Project |
93+
| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | Sort order of the returned Projects |
94+
| project-ids.{index} | | Project IDs to filter for. The results will be limited to any Projects with an ID in this array |
9595
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
9696

9797

9898

99-
### Update project
99+
### Update Project
100100

101-
Update project.
101+
Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.
102102

103103
**Usage:**
104104

@@ -112,8 +112,8 @@ scw account project update [arg=value ...]
112112
| Name | | Description |
113113
|------|---|-------------|
114114
| project-id | | Project ID to use. If none is passed the default project ID will be used |
115-
| name | | The name of the project |
116-
| description | | The description of the project |
115+
| name | | Name of the Project |
116+
| description | | Description of the Project |
117117

118118

119119

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ require (
1919
github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
2020
github.com/mattn/go-colorable v0.1.13
2121
github.com/mattn/go-isatty v0.0.17
22-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14.0.20230310155856-7a2786489bc6
22+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14.0.20230314101523-398c37802c41
2323
github.com/spf13/cobra v1.6.1
2424
github.com/spf13/pflag v1.0.5
2525
github.com/stretchr/testify v1.8.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw
7272
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
7373
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7474
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
75-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14.0.20230310155856-7a2786489bc6 h1:bAqxZt/1FAD/M4XLqWYHySz5kNcoQ7Mrdo7imgWAyaQ=
76-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14.0.20230310155856-7a2786489bc6/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
75+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14.0.20230314101523-398c37802c41 h1:D9rWQCzAaXoBOEQTnw+x5YI1JLZRj/ccKtT4u5DCC1E=
76+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14.0.20230314101523-398c37802c41/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
7777
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
7878
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
7979
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=

internal/namespaces/account/v2/account_cli.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ func accountProject() *core.Command {
4747

4848
func accountProjectCreate() *core.Command {
4949
return &core.Command{
50-
Short: `Create project`,
51-
Long: `Create project.`,
50+
Short: `Create a new Project for an Organization`,
51+
Long: `Generate a new Project for an Organization, specifying its configuration including name and description.`,
5252
Namespace: "account",
5353
Resource: "project",
5454
Verb: "create",
@@ -57,14 +57,14 @@ func accountProjectCreate() *core.Command {
5757
ArgSpecs: core.ArgSpecs{
5858
{
5959
Name: "name",
60-
Short: `The name of the project`,
60+
Short: `Name of the Project`,
6161
Required: false,
6262
Deprecated: false,
6363
Positional: false,
6464
},
6565
{
6666
Name: "description",
67-
Short: `The description of the project`,
67+
Short: `Description of the Project`,
6868
Required: false,
6969
Deprecated: false,
7070
Positional: false,
@@ -84,8 +84,8 @@ func accountProjectCreate() *core.Command {
8484

8585
func accountProjectList() *core.Command {
8686
return &core.Command{
87-
Short: `List projects`,
88-
Long: `List projects.`,
87+
Short: `List all Projects of an Organization`,
88+
Long: `List all Projects of an Organization. The response will include the total number of Projects as well as their associated Organizations, names and IDs. Other information include the creation and update date of the Project.`,
8989
Namespace: "account",
9090
Resource: "project",
9191
Verb: "list",
@@ -94,22 +94,22 @@ func accountProjectList() *core.Command {
9494
ArgSpecs: core.ArgSpecs{
9595
{
9696
Name: "name",
97-
Short: `The name of the project`,
97+
Short: `Name of the Project`,
9898
Required: false,
9999
Deprecated: false,
100100
Positional: false,
101101
},
102102
{
103103
Name: "order-by",
104-
Short: `The sort order of the returned projects`,
104+
Short: `Sort order of the returned Projects`,
105105
Required: false,
106106
Deprecated: false,
107107
Positional: false,
108108
EnumValues: []string{"created_at_asc", "created_at_desc", "name_asc", "name_desc"},
109109
},
110110
{
111111
Name: "project-ids.{index}",
112-
Short: `Filter out by a list of project ID`,
112+
Short: `Project IDs to filter for. The results will be limited to any Projects with an ID in this array`,
113113
Required: false,
114114
Deprecated: false,
115115
Positional: false,
@@ -134,8 +134,8 @@ func accountProjectList() *core.Command {
134134

135135
func accountProjectGet() *core.Command {
136136
return &core.Command{
137-
Short: `Get project`,
138-
Long: `Get project.`,
137+
Short: `Get an existing Project`,
138+
Long: `Retrieve information about an existing Project, specified by its Project ID. Its full details, including ID, name and description, are returned in the response object.`,
139139
Namespace: "account",
140140
Resource: "project",
141141
Verb: "get",
@@ -157,8 +157,8 @@ func accountProjectGet() *core.Command {
157157

158158
func accountProjectDelete() *core.Command {
159159
return &core.Command{
160-
Short: `Delete project`,
161-
Long: `Delete project.`,
160+
Short: `Delete an existing Project`,
161+
Long: `Delete an existing Project, specified by its Project ID. The Project needs to be empty (meaning there are no resources left in it) to be deleted effectively. Note that deleting a Project is permanent, and cannot be undone.`,
162162
Namespace: "account",
163163
Resource: "project",
164164
Verb: "delete",
@@ -186,8 +186,8 @@ func accountProjectDelete() *core.Command {
186186

187187
func accountProjectUpdate() *core.Command {
188188
return &core.Command{
189-
Short: `Update project`,
190-
Long: `Update project.`,
189+
Short: `Update Project`,
190+
Long: `Update the parameters of an existing Project, specified by its Project ID. These parameters include the name and description.`,
191191
Namespace: "account",
192192
Resource: "project",
193193
Verb: "update",
@@ -197,14 +197,14 @@ func accountProjectUpdate() *core.Command {
197197
core.ProjectIDArgSpec(),
198198
{
199199
Name: "name",
200-
Short: `The name of the project`,
200+
Short: `Name of the Project`,
201201
Required: false,
202202
Deprecated: false,
203203
Positional: false,
204204
},
205205
{
206206
Name: "description",
207-
Short: `The description of the project`,
207+
Short: `Description of the Project`,
208208
Required: false,
209209
Deprecated: false,
210210
Positional: false,

0 commit comments

Comments
 (0)