Skip to content

Commit 63cdf2b

Browse files
committed
feature(cli) Upgrade CLI documentation for 0.22
Signed-off-by: Jerome Simeon <[email protected]>
1 parent 22a0c18 commit 63cdf2b

File tree

7 files changed

+703
-70
lines changed

7 files changed

+703
-70
lines changed

docs/ref-cicero-cli.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Options:
4949
--sample path to the contract text [string]
5050
--output path to the output file [string]
5151
--currentTime set current time [string] [default: null]
52+
--utcOffset set UTC offset [number] [default: null]
53+
--offline do not resolve external models [boolean] [default: false]
5254
--warnings print warnings [boolean] [default: false]
5355
```
5456

@@ -69,6 +71,8 @@ Options:
6971
--data path to the contract data [string]
7072
--output path to the output file [string]
7173
--currentTime set current time [string] [default: null]
74+
--utcOffset set UTC offset [number] [default: null]
75+
--offline do not resolve external models [boolean] [default: false]
7276
--format target format [string]
7377
--unquoteVariables remove variables quoting [boolean] [default: false]
7478
--warnings print warnings [boolean] [default: false]
@@ -92,8 +96,9 @@ Options:
9296
--overwrite overwrite the contract text [boolean] [default: false]
9397
--output path to the output file [string]
9498
--currentTime set current time [string] [default: null]
99+
--utcOffset set UTC offset [number] [default: null]
100+
--offline do not resolve external models [boolean] [default: false]
95101
--warnings print warnings [boolean] [default: false]
96-
--wrapVariables wrap variables as XML tags [boolean] [default: false]
97102
--format target format [string]
98103
--unquoteVariables remove variables quoting [boolean] [default: false]
99104
```
@@ -116,6 +121,8 @@ Options:
116121
--request path to the JSON request [array]
117122
--state path to the JSON state [string]
118123
--currentTime set current time [string] [default: null]
124+
--utcOffset set UTC offset [number] [default: null]
125+
--offline do not resolve external models [boolean] [default: false]
119126
--warnings print warnings [boolean] [default: false]
120127
```
121128

@@ -138,6 +145,8 @@ Options:
138145
--params path to the parameters [string]
139146
--state path to the JSON state [string]
140147
--currentTime set current time [string] [default: null]
148+
--utcOffset set UTC offset [number] [default: null]
149+
--offline do not resolve external models [boolean] [default: false]
141150
--warnings print warnings [boolean] [default: false]
142151
```
143152

@@ -156,9 +165,13 @@ Options:
156165
--help Show help [boolean]
157166
--template path to the template [string]
158167
--sample path to the contract text [string]
168+
--params path to the parameters [string]
159169
--currentTime initialize with this current time [string] [default: null]
170+
--utcOffset set UTC offset [number] [default: null]
171+
--offline do not resolve external models [boolean] [default: false]
160172
--warnings print warnings [boolean] [default: false]
161173
```
174+
162175
## cicero archive
163176

164177
`cicero archive` creates a Cicero Template Archive (`.cta`) file from a template stored in a local directory.
@@ -196,6 +209,7 @@ Options:
196209
--output path to the output directory [string] [default: "./output/"]
197210
--warnings print warnings [boolean] [default: false]
198211
```
212+
199213
## cicero get
200214

201215
`cicero get` saves local copies of external dependencies.

docs/ref-concerto-cli.md

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Commands:
2121
concerto get save local copies of external model dependencies
2222

2323
Options:
24-
--version Show version number [boolean]
25-
--verbose, -v [default: false]
26-
--help Show help [boolean]
24+
--version Show version number [boolean]
25+
-v, --verbose [default: false]
26+
--help Show help [boolean]
2727
```
2828

2929
## concerto validate
@@ -35,33 +35,33 @@ concerto validate
3535
validate JSON against model files
3636

3737
Options:
38-
--version Show version number [boolean]
39-
--verbose, -v [default: false]
40-
--help Show help [boolean]
41-
--sample sample JSON to validate [string]
42-
--ctoSystem system model to be used [string]
43-
--ctoFiles array of CTO files [array]
44-
--offline do not resolve external models [boolean] [default: false]
38+
--version Show version number [boolean]
39+
-v, --verbose [default: false]
40+
--help Show help [boolean]
41+
--input JSON to validate [string]
42+
--model array of concerto (cto) model files [array]
43+
--utcOffset set UTC offset [number]
44+
--offline do not resolve external models [boolean] [default: false]
45+
--functional new validation API [boolean] [default: false]
46+
--ergo validation and emit for Ergo [boolean] [default: false]
4547
```
4648

4749
### Example
4850
For example, using the `validate` command to check the sample `request.json` file from a [Late Delivery and Penalty](https://github.com/accordproject/cicero-template-library/tree/master/src/latedeliveryandpenalty) clause:
4951

5052
```
51-
concerto validate --sample request.json --ctoFiles model/clause.cto
53+
concerto validate --input request.json --model model/clause.cto
5254
```
5355

5456
returns:
5557

5658
```json
57-
info:
5859
{
5960
"$class": "org.accordproject.latedeliveryandpenalty.LateDeliveryAndPenaltyRequest",
6061
"forceMajeure": false,
61-
"agreedDelivery": "2017-12-17T03:24:00.000-05:00",
62+
"agreedDelivery": "2017-12-17T04:24:00.000-04:00",
6263
"goodsValue": 200,
63-
"transactionId": "9f241804-118e-439e-bef4-49ee8cf57875",
64-
"timestamp": "2019-10-29T15:08:46.219Z"
64+
"$timestamp": "2021-06-17T09:41:54.207-04:00"
6565
}
6666
```
6767

@@ -74,30 +74,29 @@ concerto compile
7474
generate code for a target platform
7575

7676
Options:
77-
--version Show version number [boolean]
78-
--verbose, -v [default: false]
79-
--help Show help [boolean]
80-
--ctoSystem system model to be used [string]
81-
--ctoFiles array of CTO files [array] [required]
82-
--offline do not resolve external models [boolean] [default: false]
83-
--target target of the code generation [string] [default: "JSONSchema"]
84-
--output output directory path [string] [default: "./output/"]
77+
--version Show version number [boolean]
78+
-v, --verbose [default: false]
79+
--help Show help [boolean]
80+
--model array of concerto (cto) model files [array] [required]
81+
--offline do not resolve external models [boolean] [default: false]
82+
--target target of the code generation [string] [default: "JSONSchema"]
83+
--output output directory path [string] [default: "./output/"]
8584
```
8685

8786
At the moment, the available target formats are as follows:
88-
- Go Lang: `concerto compile --ctoFiles modelfile.cto --target Go`
89-
- Plant UML: `concerto compile --ctoFiles modelfile.cto --target PlantUML`
90-
- Typescript: `concerto compile --ctoFiles modelfile.cto --target Typescript`
91-
- Java: `concerto compile --ctoFiles modelfile.cto --target Java`
92-
- JSONSchema: `concerto compile --ctoFiles modelfile.cto --target JSONSchema`
93-
- XMLSchema: `concerto compile --ctoFiles modelfile.cto --target XMLSchema`
87+
- Go Lang: `concerto compile --model modelfile.cto --target Go`
88+
- Plant UML: `concerto compile --model modelfile.cto --target PlantUML`
89+
- Typescript: `concerto compile --model modelfile.cto --target Typescript`
90+
- Java: `concerto compile --model modelfile.cto --target Java`
91+
- JSONSchema: `concerto compile --model modelfile.cto --target JSONSchema`
92+
- XMLSchema: `concerto compile --model modelfile.cto --target XMLSchema`
9493

9594
### Example
9695
For example, using the `compile` command to export the `clause.cto` file from a [Late Delivery and Penalty](https://github.com/accordproject/cicero-template-library/tree/master/src/latedeliveryandpenalty) clause into `Go Lang` format:
9796

9897
```md
9998
cd ./model
100-
concerto compile --ctoFiles clause.cto --target Go
99+
concerto compile --model clause.cto --target Go
101100
```
102101

103102
returns:
@@ -114,19 +113,18 @@ concerto get
114113
save local copies of external model dependencies
115114

116115
Options:
117-
--version Show version number [boolean]
118-
--verbose, -v [default: false]
119-
--help Show help [boolean]
120-
--ctoFiles array of local CTO files [array] [required]
121-
--ctoSystem system model to be used [string]
122-
--output output directory path [string] [default: "./"]
116+
--version Show version number [boolean]
117+
-v, --verbose [default: false]
118+
--help Show help [boolean]
119+
--model array of concerto (cto) model files [array] [required]
120+
--output output directory path [string] [default: "./"]
123121
```
124122

125123
### Example
126124
For example, using the `get` command to get the external models in the `clause.cto` file from a [Late Delivery and Penalty](https://github.com/accordproject/cicero-template-library/tree/master/src/latedeliveryandpenalty) clause:
127125

128126
```md
129-
concerto get --ctoFiles clause.cto
127+
concerto get --model clause.cto
130128
```
131129

132130
returns:

0 commit comments

Comments
 (0)