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
testing, if I change the output swagger from x-enum-varnames to x-enumNames the generated types are correct (see sandbox), would be nice to have support for both.
Hi, not sure if an option is needed. We can just add a check for x-enum-varnames or for x-enumNames. This means a developer does not need to specify which type he is using and in the background will Kubb handle the conversion.
What is the problem this feature would solve?
currently kubb supports x-enumNames for naming the enum fields. on our server we use swaggo (https://github.com/swaggo/swag) to generate the swagger yaml and it uses x-enum-varnames.
testing, if I change the output swagger from x-enum-varnames to x-enumNames the generated types are correct (see sandbox), would be nice to have support for both.
External documents/projects?
https://codesandbox.io/p/devbox/naughty-noyce-5g2n53
What is the feature you are proposing to solve the problem?
for
createSwaggerTs
add optionenumsInput: "x-enum-varnames" | "x-enumNames"
another option can be to give
createSwagger
an option to transform the doc (maybe a function that takes a node of the yaml and returns another node)What alternatives have you considered?
just running another tool to transform the swagger doc
The text was updated successfully, but these errors were encountered: