Skip to content

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

Open
marco-carvalho wants to merge 1 commit intoanatine:mainfrom
marco-carvalho:required-fields-only
Open

[zod-mock]: add requiredOnly option to generate only required fields#266
marco-carvalho wants to merge 1 commit intoanatine:mainfrom
marco-carvalho:required-fields-only

Conversation

@marco-carvalho
Copy link
Copy Markdown

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

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
Copy link
Copy Markdown

nx-cloud bot commented Nov 24, 2025

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

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.

1 participant