-
-
Notifications
You must be signed in to change notification settings - Fork 51
feat(config): add validationSchemaExportType
option
#165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@elijaholmos Hi 👋 I think it's nice PR. I'll merge it if it is passed CI. Thanks! |
Thank you for pointing this out + providing reproduction steps, @Code-Hex. I was able to get the same issue on my machine and have a few ideas for a fix. I will play around more this Friday PDT and update the PR then 👍 |
Amazing @elijaholmos !! |
hi @Code-Hex! I've managed to resolve the enum errors that were occurring previously by updating the do you know if there's any way to instruct the generator to place the enum definitions above their corresponding input schemas? I tried moving the |
@elijaholmos I'm sorry for being late. |
@Code-Hex it's ok! I'll give that a try and let you know what I'm able to come up with. thanks for the starting point |
okay @Code-Hex! I used a string array variable similar to I still get a small handful of errors when running |
@elijaholmos Thanks! |
src/config.ts
Outdated
* validationSchemaExportType: const | ||
* ``` | ||
*/ | ||
validationSchemaExportType?: ValidationSchemaExportType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add validation for this?
Currently, the config has accepted any values (but are not affected. because some logic treats as function
)
@Code-Hex pardon the closing of the PR- that was unintentional as I reset my fork branch to match your repo's upstream. anyways, in the are you able to confirm this on your end? |
@elijaholmos Thanks! Oh, I see. I will fix the problem on my end! |
@Code-Hex ty! let me know when it is done and I will reopen my PR |
Resolves #164
Adds a new config option,
validationSchemaExportType
, to specify the export type of the generated validation schema (eitherfunction
orconst
), Feature supports yup, zod, and myzod.