openapi-ts-generator 10.31.2 → 10.41.1

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": "10.31.2",
3
+ "version": "10.41.1",
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",
@@ -54,8 +54,8 @@
54
54
  "@types/lodash": "^4.17.23",
55
55
  "@types/node": "^22.19.7",
56
56
  "@types/pluralize": "^0.0.33",
57
- "@typescript-eslint/eslint-plugin": "^8.54.0",
58
- "@typescript-eslint/parser": "^8.54.0",
57
+ "@typescript-eslint/eslint-plugin": "^8.55.0",
58
+ "@typescript-eslint/parser": "^8.55.0",
59
59
  "eslint": "^9.39.2",
60
60
  "eslint-config-prettier": "^10.1.8",
61
61
  "eslint-plugin-import": "^2.32.0",
@@ -69,16 +69,15 @@
69
69
  "rxjs": "^7.6.0",
70
70
  "ts-jest": "^29.4.6",
71
71
  "typescript": "^5.9.3",
72
- "typescript-eslint": "^8.54.0"
72
+ "typescript-eslint": "^8.55.0"
73
73
  },
74
74
  "dependencies": {
75
- "axios": ">=1.13.x",
75
+ "axios": "^1.13.5",
76
76
  "handlebars": ">=4.x",
77
77
  "lodash": "^4.17.23",
78
78
  "pluralize": ">=8.x"
79
79
  },
80
80
  "peerDependencies": {
81
- "axios": ">=1.13.x",
82
81
  "handlebars": ">=4.x",
83
82
  "pluralize": ">=8.x",
84
83
  "rxjs": "*"
@@ -23,9 +23,9 @@ export function {{name}}FormGroupFac(): FormGroup<I{{name}}Form> {
23
23
  {{name}}: new FormArray<FormControl<{{typeScriptType}}>>([]{{#if hasValidators}}, { validators: {{#if required}}Validators.required{{/if}}{{minLengthValidator "valueProperties"}}{{maxLengthValidator "valueProperties"}}{{minimumValidator "valueProperties"}}{{maximumValidator "valueProperties"}}{{minItemsValidator "valueProperties"}}{{maxItemsValidator "valueProperties"}}{{{patternValidator "valueProperties"}}} }{{/if}}),
24
24
  {{/if}}
25
25
  {{else}}
26
- {{#if hasMultipleValidators}}
26
+ {{#if hasMultipleValidators}}{{#if required}} // @ts-expect-error this is intentional, we want the initial value to be undefined so that the required validator will work correctly.{{/if}}
27
27
  {{name}}: new FormControl<{{typeScriptType}}{{#unless required}} | null | undefined{{/unless}}>({{{initialValue}}}, { validators: Validators.compose([{{#if required}}Validators.required, {{/if}}{{#if email}}Validators.email, {{/if}}{{#if uri}}Validators.pattern('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?'), {{/if}}{{minLengthValidator "valueProperties"}}{{maxLengthValidator "valueProperties"}}{{minimumValidator "valueProperties"}}{{maximumValidator "valueProperties"}}{{minItemsValidator "valueProperties"}}{{maxItemsValidator "valueProperties"}}{{{patternValidator "valueProperties"}}}]){{#if required}}, nonNullable: true{{/if}} }),
28
- {{else}}
28
+ {{else}}{{#if required}} // @ts-expect-error this is intentional, we want the initial value to be undefined so that the required validator will work correctly.{{/if}}
29
29
  {{name}}: new FormControl<{{typeScriptType}}{{#unless required}} | null | undefined{{/unless}}>({{{initialValue}}}{{#if hasValidators}}, { validators: {{#if required}}Validators.required{{/if}}{{#if email}}Validators.email {{/if}}{{#if uri}}Validators.pattern('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?') {{/if}}{{minLengthValidator "valueProperties"}}{{maxLengthValidator "valueProperties"}}{{minimumValidator "valueProperties"}}{{maximumValidator "valueProperties"}}{{minItemsValidator "valueProperties"}}{{maxItemsValidator "valueProperties"}}{{{patternValidator "valueProperties"}}}{{#if required}}, nonNullable: true{{/if}} } {{/if}}),
30
30
  {{/if}}
31
31
  {{/if}}
@@ -44,9 +44,9 @@ export function {{name}}FormGroupFac(): FormGroup<I{{name}}Form> {
44
44
  {{name}}: new FormArray<FormGroup<I{{typeScriptType}}Form>>([]{{#if hasValidators}}, { validators: {{#if required}}Validators.required{{/if}}{{minLengthValidator "referenceProperties"}}{{maxLengthValidator "referenceProperties"}}{{minimumValidator "referenceProperties"}}{{maximumValidator "referenceProperties"}}{{minItemsValidator "referenceProperties"}}{{maxItemsValidator "referenceProperties"}}{{{patternValidator "referenceProperties"}}} } {{/if}}),
45
45
  {{/if}}
46
46
  {{else if isEnum}}
47
- {{#if hasMultipleValidators}}
47
+ {{#if hasMultipleValidators}}{{#if required}} // @ts-expect-error this is intentional, we want the initial value to be undefined so that the required validator will work correctly.{{/if}}
48
48
  {{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}} }),
49
- {{else}}
49
+ {{else}}{{#if required}} // @ts-expect-error this is intentional, we want the initial value to be undefined so that the required validator will work correctly.{{/if}}
50
50
  {{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}}),
51
51
  {{/if}}
52
52
  {{else}}