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
In V3(not sure about V2), null is a valid value for component enum properties. Attempting to run the swagger generator on a schema containing an enum null value will result in
Assuming the property is properly marked as nullable, the generator should just skip the null value since | null will be prepended to the type definition anyway.
Found in 2.4.2
The text was updated successfully, but these errors were encountered:
This was fixed in #234 I believe, and should have been released in v3 of this library. Please give the new version a try, and let me know if you encounter any difficulties (and if you are still seeing the same error, please post your source schema and we can add a fix quickly!)
Hi!
In V3(not sure about V2),
null
is a valid value for componentenum
properties. Attempting to run the swagger generator on a schema containing an enum null value will result inTypeError: Cannot read property 'replace' of null
...on this line
https://github.com/drwpow/openapi-typescript/blob/14353afb246533a134247ccf720515dd441cddfe/src/v3.ts#L67
...since
item
can be null.Assuming the property is properly marked as
nullable
, the generator should just skip thenull
value since| null
will be prepended to the type definition anyway.Found in
2.4.2
The text was updated successfully, but these errors were encountered: