openapi-ts-generator 5.220.11 → 5.221.5

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://ikemtz.visualstudio.com/CI%20CD/_apis/build/status/openapi-ts-generator?branchName=master)](https://ikemtz.visualstudio.com/CI%20CD/_build/latest?definitionId=20&branchName=master) [![npm version](https://badge.fury.io/js/openapi-ts-generator.svg)](https://www.npmjs.com/package/openapi-ts-generator) [![npm downloads](https://img.shields.io/npm/dt/openapi-ts-generator)](https://www.npmjs.com/package/openapi-ts-generator) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ikemtz_openapi-ts-generator&metric=alert_status)](https://sonarcloud.io/dashboard?id=ikemtz_openapi-ts-generator) [![Issues](https://img.shields.io/github/issues-raw/ikemtz/OpenApi-TS-Generator)](https://github.com/ikemtz/openapi-ts-generator/issues) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=ikemtz_openapi-ts-generator&metric=coverage)](https://sonarcloud.io/dashboard?id=ikemtz_openapi-ts-generator) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=ikemtz_openapi-ts-generator&metric=ncloc)](https://sonarcloud.io/dashboard?id=ikemtz_openapi-ts-generator) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=ikemtz_openapi-ts-generator&metric=security_rating)](https://sonarcloud.io/dashboard?id=ikemtz_openapi-ts-generator)
1
+ [![Build Status](https://ikemtz.visualstudio.com/CI%20CD/_apis/build/status/openapi-ts-generator?branchName=master)](https://ikemtz.visualstudio.com/CI%20CD/_build/latest?definitionId=20&branchName=master) [![npm version](https://badge.fury.io/js/openapi-ts-generator.svg)](https://www.npmjs.com/package/openapi-ts-generator) [![npm downloads](https://img.shields.io/npm/dt/openapi-ts-generator)](https://www.npmjs.com/package/openapi-ts-generator) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ikemtz_openapi-ts-generator&metric=alert_status)](https://sonarcloud.io/dashboard?id=ikemtz_openapi-ts-generator) [![Issues](https://img.shields.io/github/issues-raw/ikemtz/OpenApi-TS-Generator)](https://github.com/ikemtz/openapi-ts-generator/issues) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=ikemtz_openapi-ts-generator&metric=coverage)](https://sonarcloud.io/dashboard?id=ikemtz_openapi-ts-generator) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=ikemtz_openapi-ts-generator&metric=ncloc)](https://sonarcloud.io/dashboard?id=ikemtz_openapi-ts-generator) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=ikemtz_openapi-ts-generator&metric=security_rating)](https://sonarcloud.io/dashboard?id=ikemtz_openapi-ts-generator) [![CodeQL](https://github.com/ikemtz/openapi-ts-generator/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/ikemtz/openapi-ts-generator/actions/workflows/codeql-analysis.yml)
2
2
 
3
3
  # OpenApi-TS-Generator
4
4
 
@@ -169,6 +169,9 @@ var OpenApiDocConverter = /** @class */ (function () {
169
169
  else if (typescriptType === 'boolean') {
170
170
  return 'false';
171
171
  }
172
+ else if (typescriptType === 'number') {
173
+ return '0';
174
+ }
172
175
  else {
173
176
  return "''";
174
177
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-ts-generator",
3
- "version": "5.220.11",
3
+ "version": "5.221.5",
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",
@@ -17,7 +17,7 @@ export function {{name}}FormGroupFac(): FormGroup {
17
17
  {{#if hasMultipleValidators}}
18
18
  {{name}}: new FormControl([], { validators: Validators.compose([{{#if required}}Validators.required, {{/if}}{{minLengthValidator "valueProperties"}}{{maxLengthValidator "valueProperties"}}{{minimumValidator "valueProperties"}}{{maximumValidator "valueProperties"}}{{{patternValidator "valueProperties"}}}]) })),
19
19
  {{else}}
20
- {{name}}: new FormControl([]{{#if hasValidators}}, { validators: {{#if required}}Validators.required{{/if}}{{minLengthValidator "valueProperties"}}{{maxLengthValidator "valueProperties"}}{{minimumValidator "valueProperties"}}{{maximumValidator "valueProperties"}}{{{patternValidator "valueProperties"}}}{{#if required}}, nonNullable: true{{/if}} }{{/if}}),
20
+ {{name}}: new FormControl([]{{#if hasValidators}}, { validators: {{#if required}}Validators.required{{/if}}{{minLengthValidator "valueProperties"}}{{maxLengthValidator "valueProperties"}}{{minimumValidator "valueProperties"}}{{maximumValidator "valueProperties"}}{{{patternValidator "valueProperties"}}} }{{/if}}),
21
21
  {{/if}}
22
22
  {{else}}
23
23
  {{#if hasMultipleValidators}}
@@ -30,9 +30,9 @@ export function {{name}}FormGroupFac(): FormGroup {
30
30
  {{#referenceProperties}}
31
31
  {{#if isArray}}
32
32
  {{#if hasMultipleValidators}}
33
- {{name}}: new FormArray([], { validators: Validators.compose([{{#if required}}Validators.required, {{/if}}{{minLengthValidator "referenceProperties"}}{{maxLengthValidator "referenceProperties"}}{{minimumValidator "referenceProperties"}}{{maximumValidator "referenceProperties"}}{{{patternValidator "referenceProperties"}}}]){{#if required}}, nonNullable: true{{/if}} }),
33
+ {{name}}: new FormArray([], { validators: Validators.compose([{{#if required}}Validators.required, {{/if}}{{minLengthValidator "referenceProperties"}}{{maxLengthValidator "referenceProperties"}}{{minimumValidator "referenceProperties"}}{{maximumValidator "referenceProperties"}}{{{patternValidator "referenceProperties"}}}]) }),
34
34
  {{else}}
35
- {{name}}: new FormArray([]{{#if hasValidators}}, { validators: {{#if required}}Validators.required{{/if}}{{minLengthValidator "referenceProperties"}}{{maxLengthValidator "referenceProperties"}}{{minimumValidator "referenceProperties"}}{{maximumValidator "referenceProperties"}}{{{patternValidator "referenceProperties"}}}{{#if required}}, nonNullable: true{{/if}} } {{/if}}),
35
+ {{name}}: new FormArray([]{{#if hasValidators}}, { validators: {{#if required}}Validators.required{{/if}}{{minLengthValidator "referenceProperties"}}{{maxLengthValidator "referenceProperties"}}{{minimumValidator "referenceProperties"}}{{maximumValidator "referenceProperties"}}{{{patternValidator "referenceProperties"}}} } {{/if}}),
36
36
  {{/if}}
37
37
  {{else}}
38
38
  {{#if hasMultipleValidators}}