openapi-ts-generator 5.259.4 → 5.262.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-ts-generator",
3
- "version": "5.259.4",
3
+ "version": "5.262.2",
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",
@@ -38,9 +38,9 @@ export function {{name}}FormGroupFac(): FormGroup<I{{name}}Form> {
38
38
  {{/if}}
39
39
  {{else if isEnum}}
40
40
  {{#if hasMultipleValidators}}
41
- {{name}}: new FormControl<{{typeScriptType}}{{#unless required}} | null | undefined{{/unless}}>({{{initialValue}}}, { validators: Validators.compose([{{#if required}}Validators.required, {{/if}}{{minLengthValidator "referenceProperties"}}{{maxLengthValidator "referenceProperties"}}{{minimumValidator "referenceProperties"}}{{maximumValidator "referenceProperties"}}{{minItemsValidator "referenceProperties"}}{{maxItemsValidator "referenceProperties"}}{{{patternValidator "referenceProperties"}}}]){{#if required}}, nonNullable: true{{/if}} }),
41
+ {{name}}: new FormControl<{{typeScriptType}} | string{{#unless required}} | null | undefined{{/unless}}>({{{initialValue}}}, { validators: Validators.compose([{{#if required}}Validators.required, {{/if}}{{minLengthValidator "referenceProperties"}}{{maxLengthValidator "referenceProperties"}}{{minimumValidator "referenceProperties"}}{{maximumValidator "referenceProperties"}}{{minItemsValidator "referenceProperties"}}{{maxItemsValidator "referenceProperties"}}{{{patternValidator "referenceProperties"}}}]){{#if required}}, nonNullable: true{{/if}} }),
42
42
  {{else}}
43
- {{name}}: new FormControl<{{typeScriptType}}{{#unless required}} | null| undefined{{/unless}}>({{{initialValue}}}{{#if hasValidators}}, { validators: {{#if required}}Validators.required{{/if}}{{minLengthValidator "referenceProperties"}}{{maxLengthValidator "referenceProperties"}}{{minimumValidator "referenceProperties"}}{{maximumValidator "referenceProperties"}}{{minItemsValidator "referenceProperties"}}{{maxItemsValidator "referenceProperties"}}{{{patternValidator "referenceProperties"}}}{{#if required}}, nonNullable: true{{/if}} } {{/if}}),
43
+ {{name}}: new FormControl<{{typeScriptType}} | string{{#unless required}} | null | undefined{{/unless}}>({{{initialValue}}}{{#if hasValidators}}, { validators: {{#if required}}Validators.required{{/if}}{{minLengthValidator "referenceProperties"}}{{maxLengthValidator "referenceProperties"}}{{minimumValidator "referenceProperties"}}{{maximumValidator "referenceProperties"}}{{minItemsValidator "referenceProperties"}}{{maxItemsValidator "referenceProperties"}}{{{patternValidator "referenceProperties"}}}{{#if required}}, nonNullable: true{{/if}} } {{/if}}),
44
44
  {{/if}}
45
45
  {{else}}
46
46
  {{#unless isSameAsParentTypescriptType}}
@@ -22,7 +22,7 @@ export interface I{{name}}Form {
22
22
  {{#if isArray}}
23
23
  {{name}}: FormArray<FormGroup<I{{typeScriptType}}Form>>;
24
24
  {{else if isEnum}}
25
- {{name}}: FormControl<{{typeScriptType}}{{#unless required}} | null | undefined{{/unless}}>;
25
+ {{name}}: FormControl<{{typeScriptType}} | string{{#unless required}} | null | undefined{{/unless}}>;
26
26
  {{else}}
27
27
  {{name}}{{#if isSameAsParentTypescriptType}}?{{/if}}: FormGroup<I{{typeScriptType}}Form>;
28
28
  {{/if}}