-
Notifications
You must be signed in to change notification settings - Fork 576
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
fix(swagger): fix the parsing of enum types with array (#4078) #4098
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #4098 +/- ##
==========================================
+ Coverage 84.55% 85.13% +0.58%
==========================================
Files 491 514 +23
Lines 46778 49123 +2345
Branches 5601 5199 -402
==========================================
+ Hits 39551 41823 +2272
- Misses 7191 7271 +80
+ Partials 36 29 -7 ☔ View full report in Codecov by Sentry. |
packages/swagger/test/parser.test.ts
Outdated
isArray: true, | ||
}); | ||
|
||
expect(result).toEqual({ |
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.
这好像不是这么用的
{
type: 'array',
items: {
type: 'enum',
enum: Animal
},
}
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.
确实,我一会改一下看看
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.
好像有那么点道理。。
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.
单测写的有点问题,我这边改了一下
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.
原来我一开始理解对了 🤣
但我后面细看了下你引用的代码块,以为你在说单测的问题,单测也确实有问题
Checklist
npm test
passesAffected core subsystem(s)
@midway/swagger
Description of change
#4078