openapi-ts-generator 5.227.6 → 5.230.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/templates/form.ts.hbs +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openapi-ts-generator",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.230.3",
|
|
4
4
|
"description": "Based on swagger-ts-generator, this is a type script model generator specifically for services with OpenApi spec documentation.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"build": "npm run format && npm run lint && tsc && cp -rfv ./src/templates ./lib",
|
|
9
9
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
10
10
|
"lint": "eslint . --ext .ts --output-file ./eslint-report.json --format json",
|
|
11
|
+
"link": "npm run build && cd lib && npm link && cd ..",
|
|
11
12
|
"test": "npm run build && jest --collect-coverage",
|
|
12
13
|
"prep:lib": "rm -rv ./lib/*.spec.* && rm -rv ./lib/**/*.spec.* && cp -v ./package.json ./lib/ && cp -v ./LICENSE ./lib/ && cp -v ./README.md ./lib/",
|
|
13
14
|
"debug": "npm run build && node --inspect-brk ./lib/app.js"
|
package/templates/form.ts.hbs
CHANGED
|
@@ -15,14 +15,14 @@ export interface I{{name}}Form {
|
|
|
15
15
|
{{#if isArray}}
|
|
16
16
|
{{name}}?: FormArray<FormControl<{{typeScriptType}}>>;
|
|
17
17
|
{{else}}
|
|
18
|
-
{{name}}?: FormControl<{{typeScriptType}}{{#unless required}} | null{{/unless}}
|
|
18
|
+
{{name}}?: FormControl<{{typeScriptType}}{{#unless required}} | null{{/unless}}>;
|
|
19
19
|
{{/if}}
|
|
20
20
|
{{/valueProperties}}
|
|
21
21
|
{{#referenceProperties}}
|
|
22
22
|
{{#if isArray}}
|
|
23
23
|
{{name}}?: FormArray<FormGroup<I{{typeScriptType}}Form>>;
|
|
24
24
|
{{else if isEnum}}
|
|
25
|
-
{{name}}?: FormControl<{{typeScriptType}}{{#unless required}} | null{{/unless}}
|
|
25
|
+
{{name}}?: FormControl<{{typeScriptType}}{{#unless required}} | null{{/unless}}>;
|
|
26
26
|
{{else}}
|
|
27
27
|
{{name}}?: FormGroup<I{{typeScriptType}}Form>;
|
|
28
28
|
{{/if}}
|