Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

7kyun
Copy link

@7kyun 7kyun commented Sep 29, 2024

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

@midway/swagger

Description of change

#4078

@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.13%. Comparing base (a3ca53b) to head (8c9661a).
Report is 399 commits behind head on main.

❗ 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.
📢 Have feedback on the report? Share it here.

isArray: true,
});

expect(result).toEqual({
Copy link
Member

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
    },
  }

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确实,我一会改一下看看

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好像有那么点道理。。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

单测写的有点问题,我这边改了一下

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原来我一开始理解对了 🤣
但我后面细看了下你引用的代码块,以为你在说单测的问题,单测也确实有问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants