apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

fix(route): openapi import panic

Open yjunsun opened this issue 2 years ago • 3 comments

fix openapi import panic when requestbody with empty content

Fixes #2477

Please answer these questions before submitting a pull request, or your PR will get closed.

Why submit this pull request?

  • [x] Bugfix
  • [ ] New feature provided
  • [ ] Improve performance
  • [ ] Backport patches

What changes will this PR take into?

Please update this section with detailed description.

Related issues

fix/resolve #2477

Checklist:

  • [ ] Did you explain what problem does this PR solve? Or what new features have been added?
  • [ ] Have you added corresponding test cases?
  • [ ] Have you modified the corresponding document?
  • [ ] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

yjunsun avatar Jun 16 '22 07:06 yjunsun

Codecov Report

Merging #2478 (6c62943) into master (3b2c371) will increase coverage by 0.12%. The diff coverage is n/a.

:exclamation: Current head 6c62943 differs from pull request most recent head 5e30928. Consider uploading reports for the commit 5e30928 to get more accurate results

@@            Coverage Diff             @@
##           master    #2478      +/-   ##
==========================================
+ Coverage   68.77%   68.90%   +0.12%     
==========================================
  Files          58      131      +73     
  Lines        4042     3447     -595     
  Branches        0      842     +842     
==========================================
- Hits         2780     2375     -405     
- Misses        964     1072     +108     
+ Partials      298        0     -298     
Flag Coverage Δ
backend-e2e-test-ginkgo ?
backend-unit-test ?
frontend-e2e-test 68.90% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
api/internal/handler/data_loader/route_import.go
api/internal/core/server/http.go
api/internal/core/storage/storage_mock.go
api/internal/handler/schema/plugin.go
api/internal/core/store/validate.go
api/internal/handler/ssl/ssl.go
api/internal/core/migrate/dataset.go
api/cmd/root.go
api/internal/log/log.go
api/internal/utils/version.go
... and 179 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3b2c371...5e30928. Read the comment docs.

codecov-commenter avatar Jun 17 '22 09:06 codecov-commenter

@yjunsun LGTM, and you need to tweak the code to pass the CI test.

bzp2010 avatar Jun 20 '22 14:06 bzp2010

@yjunsun Hi, pls resolve the conflicts.

SkyeYoung avatar Jul 08 '22 06:07 SkyeYoung