You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] [typescipt-axios] Generated code fails with "exactOptionalPropertyTypes" compiler option #22153
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
The TypeScript compiler option exactOptionalPropertyTypes prevents an object property from being assigned an undefined value unless this is specifically indicated in the property type declaration. For example, in an interface declared like:
exportinterfaceExample{attr1?: string|null;}
it is legal to omit attr1 from an object, but illegal to set its value to undefined. The interface must instead be declared like:
The generator currently declares optional attributes without including the undefined value, which generates errors when this flag is set in the TypeScript compiler.
openapi-generator version
7.16.0
Probably no regression
OpenAPI declaration file content or url
This occurs on any API definition with optional properties. See below for reproduction steps.
Generation Details
Steps to reproduce
modify samples/client/petstore/typescript-axios/builds/with-complex-headers/tsconfig.json and add
Activity