using this very helpful tool (thank you for that!) we ran into an issue (certainly an edge case) with boolean inline enum values.
While it might seem strange to use enums of type boolean, being able to define constant values is sometimes necessary (e.g. specifying that a certain property is always true or false in some case), which to our knowledge is currently only possible using enums with a single value.
Using the following OpenAPI type definition
objectPropertyName:
enum:
- false
type: boolean
leads to the following interface definition being generated:
objectPropertyName: 'false'
which is not correct in my opinion and should be objectPropertyName: false (without quotes, e.g. a boolean not a string). While it might be a rare usecase, I think we should fix that. I already created a working PR (#121).
Hi everyone,
using this very helpful tool (thank you for that!) we ran into an issue (certainly an edge case) with boolean inline enum values.
While it might seem strange to use enums of type boolean, being able to define constant values is sometimes necessary (e.g. specifying that a certain property is always true or false in some case), which to our knowledge is currently only possible using enums with a single value.
Using the following OpenAPI type definition
leads to the following interface definition being generated:
which is not correct in my opinion and should be
objectPropertyName: false
(without quotes, e.g. a boolean not a string). While it might be a rare usecase, I think we should fix that. I already created a working PR (#121).