fix(shared): support non-string discriminator property types#3385
fix(shared): support non-string discriminator property types#3385SipanP wants to merge 1 commit intohey-api:mainfrom
Conversation
OpenAPI discriminator mappings use string keys, but the actual discriminator property may be boolean, integer, or number. Previously, all discriminator values were hardcoded as type 'string'. This change detects the actual property type from the schema and converts mapping values accordingly.
|
|
|
@SipanP is attempting to deploy a commit to the Hey API Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 9ef2705 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3385 +/- ##
==========================================
- Coverage 33.55% 33.37% -0.18%
==========================================
Files 447 447
Lines 16092 16188 +96
Branches 4935 4983 +48
==========================================
+ Hits 5399 5403 +4
- Misses 8611 8676 +65
- Partials 2082 2109 +27
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:
|
|
@SipanP are you able to resolve the typecheck fail? And since OpenAPI 2.0 parser was affected, can you add a spec + test the same way you did for 3.x? Looks good otherwise! |
OpenAPI discriminator mappings use string keys, but the actual discriminator property may be boolean, integer, or number. Previously, all discriminator values were hardcoded as type 'string'. This change detects the actual property type from the schema and converts mapping values accordingly.