openapi-ts-generator 5.225.7 → 5.225.9
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.225.
|
|
3
|
+
"version": "5.225.9",
|
|
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",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
import { FormControl, FormArray, FormGroup, Validators } from '@angular/forms'; //NOSONAR
|
|
10
10
|
import { I{{name}}Form } from './{{kebabCasedName}}.form';{{#if importTypes}}{{#importTypes}}{{#unless isSelfReferencing}}{{#if isEnum}}
|
|
11
11
|
import { {{name}} } from './{{kebabCasedTypeName}}.enum';{{else}}
|
|
12
|
-
import { I{{name}}Form } from './{{kebabCasedTypeName}}.form';{{
|
|
12
|
+
import { I{{name}}Form } from './{{kebabCasedTypeName}}.form';{{#unless areAllArrays}}
|
|
13
|
+
import { {{name}}FormGroupFac } from './{{kebabCasedTypeName}}.form-group-fac';{{/unless}}{{/if}}{{/unless}}{{/importTypes}}{{/if}}
|
|
13
14
|
|
|
14
15
|
export function {{name}}FormGroupFac(): FormGroup<I{{name}}Form> {
|
|
15
16
|
return new FormGroup<I{{name}}Form>({
|
|
@@ -43,9 +44,9 @@ export function {{name}}FormGroupFac(): FormGroup<I{{name}}Form> {
|
|
|
43
44
|
{{/if}}
|
|
44
45
|
{{else}}
|
|
45
46
|
{{#if hasMultipleValidators}}
|
|
46
|
-
{{name}}: new FormGroup<I{{typeScriptType}}Form{{#unless required}} | null{{/unless}}>({{
|
|
47
|
+
{{name}}: new FormGroup<I{{typeScriptType}}Form{{#unless required}} | null{{/unless}}>({{typeScriptType}}FormGroupFac().controls, { 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}} }),
|
|
47
48
|
{{else}}
|
|
48
|
-
{{name}}: new FormGroup<I{{typeScriptType}}Form{{#unless required}} | null{{/unless}}>({{
|
|
49
|
+
{{name}}: new FormGroup<I{{typeScriptType}}Form{{#unless required}} | null{{/unless}}>({{typeScriptType}}FormGroupFac().controls{{#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}}),
|
|
49
50
|
{{/if}}
|
|
50
51
|
{{/if}}
|
|
51
52
|
{{/referenceProperties}}
|