Skip to content

Conversation

@yeliex
Copy link

@yeliex yeliex commented Aug 7, 2025

This pull request introduces a new configuration option to control the generation of foreign key fields in input models, enhancing flexibility when generating model schemas. The primary change is the addition and integration of the ignoreForeignOnInputModel option.

Configuration enhancements:

  • Added the ignoreForeignOnInputModel boolean option to the configSchema in src/config.ts, allowing users to prevent foreign key fields from being generated in input models.

Input model generation logic:

  • Updated the stringifyPlain function in src/generators/plain.ts to respect the new ignoreForeignOnInputModel setting, so foreign key fields are omitted from input models when the option is enabled.

@m1212e
Copy link
Owner

m1212e commented Aug 7, 2025

Hey, thanks for your contribution, I will release a new version shortly!

@m1212e m1212e merged commit bfe7991 into m1212e:main Aug 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants