YousefED / typescript-json-schema

Generate json-schema from your Typescript sources
BSD 3-Clause "New" or "Revised" License
3.14k stars 322 forks source link

add constAsEnum flag to convert constant values to single value enum #571

Closed gassiss closed 1 year ago

gassiss commented 1 year ago

Closes https://github.com/YousefED/typescript-json-schema/issues/570

Please:

domoritz commented 1 year ago

What do you think about https://github.com/YousefED/typescript-json-schema/issues/287? Should we have a flag for openapi compatibility instead?

gassiss commented 1 year ago

What do you think about #287? Should we have a flag for openapi compatibility instead?

In our use case, we never got any errors related to nullable strings, and we do have them. So looks like the ask is a no-op. Would you prefer if I changed the flag to openApiCompatible or something? (please suggest a better name, lol :sweat_smile: )

domoritz commented 1 year ago

Nah, let's leave the flag as is then. Please fix the linting error.