Skip to content

Commit f1f72e2

Browse files
committed
doc: Improve doc of flags --filter and --format
Signed-off-by: Arthur Amstutz <arthur.amstutz@corp.ovh.com>
1 parent e0b5466 commit f1f72e2

433 files changed

Lines changed: 4100 additions & 529 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/ovhcloud_account.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ Manage your account
1212

1313
```
1414
-d, --debug Activate debug mode (will log all HTTP requests details)
15-
-f, --format string Output value according to given format (expression using gval format)
15+
-f, --format string Output value according to given format (expression using https://github.com/PaesslerAG/gval syntax)
16+
Examples:
17+
--format 'id' (to extract a single field)
18+
--format 'nested.field.subfield' (to extract a nested field)
19+
--format '[id, 'name']' (to extract multiple fields as an array)
20+
--format '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
21+
--format 'name+","+type' (to extract and concatenate fields in a string)
22+
--format '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
1623
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
1724
-i, --interactive Interactive output
1825
-j, --json Output in JSON

doc/ovhcloud_account_api.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ Manage your API credentials
1212

1313
```
1414
-d, --debug Activate debug mode (will log all HTTP requests details)
15-
-f, --format string Output value according to given format (expression using gval format)
15+
-f, --format string Output value according to given format (expression using https://github.com/PaesslerAG/gval syntax)
16+
Examples:
17+
--format 'id' (to extract a single field)
18+
--format 'nested.field.subfield' (to extract a nested field)
19+
--format '[id, 'name']' (to extract multiple fields as an array)
20+
--format '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
21+
--format 'name+","+type' (to extract and concatenate fields in a string)
22+
--format '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
1623
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
1724
-i, --interactive Interactive output
1825
-j, --json Output in JSON

doc/ovhcloud_account_api_oauth2.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ Manage your OAuth2 clients
1212

1313
```
1414
-d, --debug Activate debug mode (will log all HTTP requests details)
15-
-f, --format string Output value according to given format (expression using gval format)
15+
-f, --format string Output value according to given format (expression using https://github.com/PaesslerAG/gval syntax)
16+
Examples:
17+
--format 'id' (to extract a single field)
18+
--format 'nested.field.subfield' (to extract a nested field)
19+
--format '[id, 'name']' (to extract multiple fields as an array)
20+
--format '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
21+
--format 'name+","+type' (to extract and concatenate fields in a string)
22+
--format '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
1623
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
1724
-i, --interactive Interactive output
1825
-j, --json Output in JSON

doc/ovhcloud_account_api_oauth2_client.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ Manage your OAuth2 clients
1212

1313
```
1414
-d, --debug Activate debug mode (will log all HTTP requests details)
15-
-f, --format string Output value according to given format (expression using gval format)
15+
-f, --format string Output value according to given format (expression using https://github.com/PaesslerAG/gval syntax)
16+
Examples:
17+
--format 'id' (to extract a single field)
18+
--format 'nested.field.subfield' (to extract a nested field)
19+
--format '[id, 'name']' (to extract multiple fields as an array)
20+
--format '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
21+
--format 'name+","+type' (to extract and concatenate fields in a string)
22+
--format '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
1623
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
1724
-i, --interactive Interactive output
1825
-j, --json Output in JSON

doc/ovhcloud_account_api_oauth2_client_create.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ ovhcloud account api oauth2 client create [flags]
2424

2525
```
2626
-d, --debug Activate debug mode (will log all HTTP requests details)
27-
-f, --format string Output value according to given format (expression using gval format)
27+
-f, --format string Output value according to given format (expression using https://github.com/PaesslerAG/gval syntax)
28+
Examples:
29+
--format 'id' (to extract a single field)
30+
--format 'nested.field.subfield' (to extract a nested field)
31+
--format '[id, 'name']' (to extract multiple fields as an array)
32+
--format '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
33+
--format 'name+","+type' (to extract and concatenate fields in a string)
34+
--format '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
2835
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
2936
-i, --interactive Interactive output
3037
-j, --json Output in JSON

doc/ovhcloud_account_api_oauth2_client_delete.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ ovhcloud account api oauth2 client delete <client_id> [flags]
1616

1717
```
1818
-d, --debug Activate debug mode (will log all HTTP requests details)
19-
-f, --format string Output value according to given format (expression using gval format)
19+
-f, --format string Output value according to given format (expression using https://github.com/PaesslerAG/gval syntax)
20+
Examples:
21+
--format 'id' (to extract a single field)
22+
--format 'nested.field.subfield' (to extract a nested field)
23+
--format '[id, 'name']' (to extract multiple fields as an array)
24+
--format '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
25+
--format 'name+","+type' (to extract and concatenate fields in a string)
26+
--format '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
2027
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
2128
-i, --interactive Interactive output
2229
-j, --json Output in JSON

doc/ovhcloud_account_api_oauth2_client_edit.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ ovhcloud account api oauth2 client edit <client_id> [flags]
2020

2121
```
2222
-d, --debug Activate debug mode (will log all HTTP requests details)
23-
-f, --format string Output value according to given format (expression using gval format)
23+
-f, --format string Output value according to given format (expression using https://github.com/PaesslerAG/gval syntax)
24+
Examples:
25+
--format 'id' (to extract a single field)
26+
--format 'nested.field.subfield' (to extract a nested field)
27+
--format '[id, 'name']' (to extract multiple fields as an array)
28+
--format '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
29+
--format 'name+","+type' (to extract and concatenate fields in a string)
30+
--format '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
2431
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
2532
-i, --interactive Interactive output
2633
-j, --json Output in JSON

doc/ovhcloud_account_api_oauth2_client_get.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ ovhcloud account api oauth2 client get <client_id> [flags]
1616

1717
```
1818
-d, --debug Activate debug mode (will log all HTTP requests details)
19-
-f, --format string Output value according to given format (expression using gval format)
19+
-f, --format string Output value according to given format (expression using https://github.com/PaesslerAG/gval syntax)
20+
Examples:
21+
--format 'id' (to extract a single field)
22+
--format 'nested.field.subfield' (to extract a nested field)
23+
--format '[id, 'name']' (to extract multiple fields as an array)
24+
--format '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
25+
--format 'name+","+type' (to extract and concatenate fields in a string)
26+
--format '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
2027
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
2128
-i, --interactive Interactive output
2229
-j, --json Output in JSON

doc/ovhcloud_account_api_oauth2_client_list.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,28 @@ ovhcloud account api oauth2 client list [flags]
99
### Options
1010

1111
```
12-
--filter stringArray Filter results by any property using https://github.com/PaesslerAG/gval syntax'
12+
--filter stringArray Filter results by any property using https://github.com/PaesslerAG/gval syntax
13+
Examples:
14+
--filter 'state="running"'
15+
--filter 'name=~"^my.*"'
16+
--filter 'nested.property.subproperty>10'
17+
--filter 'startDate>="2023-12-01"'
18+
--filter 'name=~"something" && nbField>10'
1319
-h, --help help for list
1420
```
1521

1622
### Options inherited from parent commands
1723

1824
```
1925
-d, --debug Activate debug mode (will log all HTTP requests details)
20-
-f, --format string Output value according to given format (expression using gval format)
26+
-f, --format string Output value according to given format (expression using https://github.com/PaesslerAG/gval syntax)
27+
Examples:
28+
--format 'id' (to extract a single field)
29+
--format 'nested.field.subfield' (to extract a nested field)
30+
--format '[id, 'name']' (to extract multiple fields as an array)
31+
--format '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
32+
--format 'name+","+type' (to extract and concatenate fields in a string)
33+
--format '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
2134
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
2235
-i, --interactive Interactive output
2336
-j, --json Output in JSON

doc/ovhcloud_account_ssh-key.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ Manage your SSH keys
1212

1313
```
1414
-d, --debug Activate debug mode (will log all HTTP requests details)
15-
-f, --format string Output value according to given format (expression using gval format)
15+
-f, --format string Output value according to given format (expression using https://github.com/PaesslerAG/gval syntax)
16+
Examples:
17+
--format 'id' (to extract a single field)
18+
--format 'nested.field.subfield' (to extract a nested field)
19+
--format '[id, 'name']' (to extract multiple fields as an array)
20+
--format '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
21+
--format 'name+","+type' (to extract and concatenate fields in a string)
22+
--format '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
1623
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
1724
-i, --interactive Interactive output
1825
-j, --json Output in JSON

0 commit comments

Comments
 (0)