Better implementation for depictUnion#2692
Conversation
WalkthroughThe changelog was updated for clarity regarding the status of the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant depictUnion
participant zodSchema
User->>depictUnion: Call with zodSchema and jsonSchema
depictUnion->>zodSchema: Check if union or discriminated union
alt Is union/discriminated union and has discriminator
depictUnion->>zodSchema: Extract discriminator from _zod.def.discriminator
depictUnion->>User: Return jsonSchema with discriminator property
else Not a union or no discriminator
depictUnion->>User: Return original jsonSchema
end
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (1)express-zod-api/src/documentation-helpers.ts (2)🧬 Code Graph Analysis (1)express-zod-api/src/documentation-helpers.ts (1)
🔇 Additional comments (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
Summary by CodeRabbit
Documentation
getExamples()helper.Refactor