- Notifications
You must be signed in to change notification settings - Fork 11
Description
Hi,
I've got a 'People' model which is simply an array of persons:
People: type: array items: $ref: "#/components/schemas/Person" This generates export const PeopleValidators: {[K in keyof People]: Array<ValidatorFn>} = { };, which results in the following transpilation error:
ERROR in src/app/core/generated/api/model/people.ts(30,14): error TS2322: Type '{}' is not assignable to type '{ [x: number]: ValidatorFn[]; length: ValidatorFn[]; toString: ValidatorFn[]; toLocaleString: ValidatorFn[]; pop: ValidatorFn[]; push: ValidatorFn[]; concat: ValidatorFn[]; join: ValidatorFn[]; reverse: ValidatorFn[]; ... 21 more ...; includes: ValidatorFn[]; }'. Property 'length' is missing in type '{}'.
I don't know if simply assigning null instead of empty object conflicts with the form-control-factory, so I didn't try..
I assume that this error will occur with every object that doesn't have own properties.