-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: add SchemaService and FillEntityDefaults utility #119
Conversation
df63973
to
c0e7b4b
Compare
Let's do this a bit differently. |
@hbagdi good point. Since I removed the |
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.
Nice patch!
kong/utils_test.go
Outdated
expected *Route | ||
}{ | ||
{ | ||
name: "name paths", |
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.
name: "name paths", | |
name: "fills defaults for all fields except paths, leaves name as is", |
Descriptive tests, please.
Codecov Report
@@ Coverage Diff @@
## main #119 +/- ##
==========================================
+ Coverage 44.46% 44.54% +0.07%
==========================================
Files 42 43 +1
Lines 3805 3929 +124
==========================================
+ Hits 1692 1750 +58
- Misses 1793 1851 +58
- Partials 320 328 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@rainest Can I get a review from you on this one as well? |
Mirroring what's been previously done for Plugins, this adds GetFullSchema to Routes, Upstreams, Targets and Services. This also adds utils function to fill core entities with defaults comings from their schema.
9aab6cf
to
9d3708f
Compare
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.
Let's move ahead on this one. If there are more issues, @GGabriele please take care of resolving with subsequent PRs.
Mirroring what's been previously done for
Plugins
,this adds
GetFullSchema
toRoutes
,Upstreams
,Targets
andServices
.This also adds utils function to fill core entities with
defaults comings from their schema.