Skip to content

Commit 1e7e30f

Browse files
committed
chore: Update commands descriptions
1 parent 0cc9487 commit 1e7e30f

File tree

8 files changed

+46
-32
lines changed

8 files changed

+46
-32
lines changed

pkg/cmd/registry/artifact/artifacts.go

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,36 @@ func NewArtifactsCommand(f *factory.Factory) *cobra.Command {
1717
cmd := &cobra.Command{
1818
Use: "artifacts",
1919
Short: "Manage Service Registry Artifacts commands",
20-
Long: `Apicurio Registry Artifacts enables developers to manage and share the structure of their data.
21-
For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy.
22-
Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time.
23-
For example, this includes rules for content validation and version compatibility.
24-
25-
Registry commands enable client applications to manage the artifacts in the registry.
26-
This set of commands provide create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata.`,
20+
Long: `
21+
Apicurio Registry Artifacts enables developers to manage and share the structure of their data.
22+
For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy.
23+
Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time.
24+
For example, this includes rules for content validation and version compatibility.
25+
26+
Registry commands enable client applications to manage the artifacts in the registry.
27+
This set of commands provide create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata.
28+
`,
2729
Example: `
28-
## Create artifact in my-group from schema.json file
29-
rhoas service-registry artifacts create my-group schema.json
30+
## Create artifact in my-group from schema.json file
31+
rhoas service-registry artifact create --artifact=my-artifact --group=my-group artifact.json
32+
33+
## Get artifact content
34+
rhoas service-registry artifact get --artifact=my-artifact --group=my-group file.json
35+
36+
## Delete artifact
37+
rhoas service-registry artifact delete --artifact=my-artifact
38+
39+
## Get artifact metadata
40+
rhoas service-registry artifact metadata --artifact=my-artifact --group=my-group
41+
42+
## Update artifact
43+
rhoas service-registry artifact update --artifact=my-artifact artifact-new.json
44+
45+
## List Artifacts
46+
rhoas service-registry artifact list --group=my-group --limit=10 page=1
3047
31-
## List Artifacts
32-
rhoas service-registry artifacts list my-group
48+
## View artifact versions
49+
rhoas service-registry artifact versions --artifact=my-artifact --group=my-group
3350
`,
3451
Args: cobra.MinimumNArgs(1),
3552
}

pkg/cmd/registry/artifact/crud/create/create.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,11 @@ func NewCreateCommand(f *factory.Factory) *cobra.Command {
8787
Short: "Creates new artifact from file or standard input",
8888
Long: longDescription,
8989
Example: `
90-
## Create artifact in my-group from schema.json file
91-
rhoas service-registry artifacts create my-group schema.json
92-
9390
# Create an artifact in default group
94-
rhoas service-registry artifacts create my-artifact.json
91+
rhoas service-registry artifact create my-artifact.json
9592
9693
# Create an artifact with specified type
97-
rhoas service-registry artifacts create --type=JSON my-artifact.json
94+
rhoas service-registry artifact create --type=JSON my-artifact.json
9895
`,
9996
Args: cobra.RangeArgs(0, 1),
10097
RunE: func(cmd *cobra.Command, args []string) error {

pkg/cmd/registry/artifact/crud/get/get.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,16 @@ For fetching artifacts using global identifiers please use "service-registry dow
5757
`,
5858
Example: `
5959
## Get latest artifact by name
60-
rhoas service-registry artifacts get myschema
60+
rhoas service-registry artifact get myschema
6161
6262
## Get latest artifact and save its content to file
63-
rhoas service-registry artifacts get myschema myschema.json
63+
rhoas service-registry artifact get myschema myschema.json
6464
6565
## Get latest artifact and pipe it to other command
66-
rhoas service-registry artifacts get myschema | grep -i 'user'
66+
rhoas service-registry artifact get myschema | grep -i 'user'
6767
6868
## Get latest artifact by specifying custom group, registry and name as flag
69-
rhoas service-registry artifacts get --group mygroup --instance-id=myregistry --artifact myartifact
69+
rhoas service-registry artifact get --group mygroup --instance-id=myregistry --artifact myartifact
7070
`,
7171
Args: cobra.RangeArgs(0, 2),
7272
RunE: func(cmd *cobra.Command, args []string) error {

pkg/cmd/registry/artifact/crud/list/list.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ func NewListCommand(f *factory.Factory) *cobra.Command {
7575
Long: "List all artifacts for the group by specified output format (by default table)",
7676
Example: `
7777
## List all artifacts for the default artifacts group
78-
rhoas service-registry artifacts list
78+
rhoas service-registry artifact list
7979
8080
## List all artifacts with explicit group
81-
rhoas service-registry artifacts list --group=my=group
81+
rhoas service-registry artifact list --group=my-group
8282
8383
## List all artifacts with limit and group
84-
rhoas service-registry artifacts list --page=2 --limit=10
84+
rhoas service-registry artifact list --page=2 --limit=10
8585
`,
8686
Args: cobra.RangeArgs(0, 1),
8787
RunE: func(cmd *cobra.Command, args []string) error {

pkg/cmd/registry/artifact/crud/update/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ This content is updated under a unique artifactId provided by user.
6969
`,
7070
Example: `
7171
## update artifact from group and artifact-id
72-
rhoas service-registry artifacts update my-artifact.json --artifact=my-artifact --group my-group
72+
rhoas service-registry artifact update my-artifact.json --artifact=my-artifact --group my-group
7373
`,
7474
Args: cobra.RangeArgs(0, 2),
7575
RunE: func(cmd *cobra.Command, args []string) error {

pkg/cmd/registry/artifact/download/download.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ func NewDownloadCommand(f *factory.Factory) *cobra.Command {
6262
--hash - SHA-256 hash of the content`,
6363
Example: `
6464
## Get latest artifact by content id
65-
rhoas service-registry artifacts download --content-id=183282932983
65+
rhoas service-registry artifact download --content-id=183282932983
6666
6767
## Get latest artifact by content id to specific file
68-
rhoas service-registry artifacts download --content-id=183282932983 schema.json
68+
rhoas service-registry artifact download --content-id=183282932983 schema.json
6969
7070
## Get latest artifact by global id
71-
rhoas service-registry artifacts download --global-id=383282932983
71+
rhoas service-registry artifact download --global-id=383282932983
7272
7373
## Get latest artifact by hash
74-
rhoas service-registry artifacts download --hash=c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4
74+
rhoas service-registry artifact download --hash=c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4
7575
`,
7676
Args: cobra.RangeArgs(0, 1),
7777
RunE: func(cmd *cobra.Command, args []string) error {

pkg/cmd/registry/artifact/metadata/metadata.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ The returned metadata includes both generated (read-only) and editable metadata
5454
`,
5555
Example: `
5656
## Get latest artifact metadata for default group
57-
rhoas service-registry artifacts metadata my-artifact
57+
rhoas service-registry artifact metadata my-artifact
5858
5959
## Get latest artifact metadata for my-group group
60-
rhoas service-registry artifacts metadata my-artifact --group mygroup
60+
rhoas service-registry artifact metadata my-artifact --group mygroup
6161
`,
6262
Args: cobra.RangeArgs(0, 1),
6363
RunE: func(cmd *cobra.Command, args []string) error {

pkg/cmd/registry/artifact/versions/versions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ func NewVersionsCommand(f *factory.Factory) *cobra.Command {
5151
Long: "Get latest artifact versions by specifying group and artifacts id",
5252
Example: `
5353
## Get latest artifact versions for default group
54-
rhoas service-registry artifacts versions my-artifact
54+
rhoas service-registry artifact versions my-artifact
5555
5656
## Get latest artifact versions for my-group group
57-
rhoas service-registry artifacts versions my-artifact --group mygroup
57+
rhoas service-registry artifact versions my-artifact --group mygroup
5858
`,
5959
Args: cobra.RangeArgs(0, 1),
6060
RunE: func(cmd *cobra.Command, args []string) error {

0 commit comments

Comments
 (0)