Skip to content

[zod-mock]: add requiredOnly option to generate only required fields#266

Merged
Brian-McBride merged 1 commit into
anatine:mainfrom
marco-carvalho:required-fields-only
May 8, 2026
Merged

[zod-mock]: add requiredOnly option to generate only required fields#266
Brian-McBride merged 1 commit into
anatine:mainfrom
marco-carvalho:required-fields-only

Conversation

@marco-carvalho

@marco-carvalho marco-carvalho commented Nov 24, 2025

Copy link
Copy Markdown
Contributor

Problem

Users needed a way to generate mock data with only required fields populated, to test how their applications handle scenarios where optional and nullable fields are absent.

Solution

Added a requiredOnly boolean option to the mock generator that skips generating values for optional and nullable fields, while maintaining full backward compatibility.

@marco-carvalho marco-carvalho changed the title Add requiredOnly option to generate only required fields [zod-mock]: add requiredOnly option to generate only required fields Nov 24, 2025
@nx-cloud

nx-cloud Bot commented Nov 24, 2025

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 2eb0482

Command Status Duration Result
nx affected:test --base=origin/main --codeCoverage ✅ Succeeded 21s View ↗
nx affected:lint --base=origin/main ✅ Succeeded 4s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-24 21:29:06 UTC

@Brian-McBride Brian-McBride merged commit 2e7e4db into anatine:main May 8, 2026
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