-
Notifications
You must be signed in to change notification settings - Fork 542
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
refactor: OpenAPI import #2373
refactor: OpenAPI import #2373
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2373 +/- ##
===========================================
- Coverage 62.04% 30.22% -31.83%
===========================================
Files 57 59 +2
Lines 3905 3861 -44
===========================================
- Hits 2423 1167 -1256
- Misses 1197 2482 +1285
+ Partials 285 212 -73
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Expect(result.Get("total").Uint()).To(Equal(uint64(1))) | ||
Expect(result.Get("failed").Uint()).To(Equal(uint64(0))) | ||
} | ||
} |
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.
Better to get the route to check after importing the openapi.
SetFormData(map[string]string{ | ||
"_file": "default.json", | ||
"type": "openapi3", | ||
"task_name": "test_petstore_expanded_yaml", |
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.
Missing test for MergeRoute
?
big PR... |
routeID := o.TaskName + "_" + strings.NewReplacer("/", "-", "{", "", "}", "").Replace(strings.TrimPrefix(uri, "/")) | ||
|
||
// decide whether to merge multi method routes based on configuration | ||
if o.MergeRoute { |
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.
We have a contributor who submitted a PR to merge routes with the same URI:
#2330
I think this feature should also be included after the refactoring:
if len(v.Servers) > 0 { | ||
// create a new upstream when current path has separate Servers | ||
upstreamID := routeID | ||
upstream, path := generateUpstreamByServers(s.Servers, upstreamID) |
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.
s.Servers
or v.Servers
?
Please answer these questions before submitting a pull request, or your PR will get closed.
Why submit this pull request?
What changes will this PR take into?
Part of refactoring OpenAPI support to provide OpenAPI implementation based on the previous
Loader
interface and modifying the import handler to support handling ofDataSets
imports.Checklist: