-
-
Notifications
You must be signed in to change notification settings - Fork 272
Fix: Body parameters ignored in OpenAPI 2.0 when consumes undefined #2893
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
|
|
🦋 Changeset detectedLatest commit: ef1dedc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…consumes is undefined Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
|
@copilot A few test are failing. In the CallWithParameters operation, remove the |
- Removed body parameter from CallWithParameters operation (keeping only formData) - Removed formData parameter from CallWithWeirdParameterNames (keeping only body) - Fixed body parameter schema structure in CallWithWeirdParameterNames - Updated fix to only default to application/json for true body parameters, not formData - Updated all test snapshots to match new behavior Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
Done! Updated the OpenAPI 2.0 specs to remove the conflicting parameters:
Also refined the fix to only apply the Commit: f7a7a3a |
|
@copilot make sure you run |
Ran pnpm test -u to properly update ALL snapshots across all test packages (main, zod/v3, zod/v4) instead of updating them individually. This ensures consistency across the entire test suite. Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
Updated! Ran Commit: ef1dedc |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2893 +/- ##
==========================================
+ Coverage 29.99% 30.89% +0.90%
==========================================
Files 488 488
Lines 40449 40458 +9
Branches 2427 2523 +96
==========================================
+ Hits 12131 12501 +370
+ Misses 28284 27922 -362
- Partials 34 35 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
commit: |
Changes Made
Spec File Updates
Code Fix Refinement
Updated the fix in
operation.tsto only apply theapplication/jsondefault to actual body parameters (in: "body"), not formData parameters. FormData parameters without an explicitconsumeswill not get a default media type, preserving the original behavior where they don't generate a body field in the IR.Test Snapshot Updates
pnpm test -uto update ALL snapshots across all test packagesAll tests pass (552 tests in main, 75 in zod/v4, 75 in zod/v3).
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.