-
-
Notifications
You must be signed in to change notification settings - Fork 104
fix: make sure the logical DMMF respects auth()
in @default
#1904
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
📝 WalkthroughWalkthroughThe pull request introduces a new test case in the OpenAPI Plugin RPC Tests to validate the behavior of the Changes
Assessment against linked issues
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 3
🧹 Outside diff range and nitpick comments (1)
packages/schema/src/plugins/enhancer/enhance/index.ts (1)
344-344
: Use Regular Expression Literal Instead ofRegExp
ConstructorConsider using a regular expression literal instead of the
RegExp
constructor when the pattern is known at compile time. This improves readability and may enhance performance.Apply this diff:
- const createInputPattern = new RegExp(`^(.+?)(Unchecked)?Create.*Input$`); + const createInputPattern = /^(.+?)(Unchecked)?Create.*Input$/;🧰 Tools
🪛 Biome (1.9.4)
[error] 344-344: Use a regular expression literal instead of the RegExp constructor.
Regular expression literals avoid some escaping required in a string literal, and are easier to analyze statically.
Safe fix: Use a literal notation instead.(lint/complexity/useRegexLiterals)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
packages/plugins/openapi/tests/openapi-rpc.test.ts
(1 hunks)packages/schema/src/plugins/enhancer/enhance/index.ts
(4 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
packages/schema/src/plugins/enhancer/enhance/index.ts
[error] 344-344: Use a regular expression literal instead of the RegExp constructor.
Regular expression literals avoid some escaping required in a string literal, and are easier to analyze statically.
Safe fix: Use a literal notation instead.
(lint/complexity/useRegexLiterals)
🔇 Additional comments (1)
packages/plugins/openapi/tests/openapi-rpc.test.ts (1)
461-489
: Test Case Correctly Validates Optional Fields with @default(auth())
The added test effectively ensures that fields using auth()
in @default
are not marked as required in the generated OpenAPI schemas. This aligns with the intended behavior and addresses the issue described.
fixes #1893