-
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
Defines the Information Service on top of Kong's Root endpoint #65
Conversation
Codecov Report
@@ Coverage Diff @@
## main #65 +/- ##
==========================================
- Coverage 45.50% 39.74% -5.77%
==========================================
Files 40 41 +1
Lines 2525 2539 +14
==========================================
- Hits 1149 1009 -140
- Misses 1077 1280 +203
+ Partials 299 250 -49
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
The proposed API design:
- makes a new HTTP request for each separate field of information
- treats the returned object as unstructured
We should instead:
- define a data structure to deserialize the JSON object into
- have just one API on the service that pulls the kong info endpoint (
/
or/:workspace/kong
) - define accessor methods for individual bits of information on that object, instead of implementing them on the abstract service
What do you think of something like this :
And as it would be a single function it doesn't need an entire service of it's own. So it would directly be at the client's level.
|
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.
Some minor style issues + a request for a simple integration test. Otherwise the information service looks good to me.
Please consider this comment #65 (comment) non-blocking - we'll make adjustments before merging if necessary.
Co-authored-by: Michał Flendrich <m.flendrich@gmail.com>
Co-authored-by: Michał Flendrich <m.flendrich@gmail.com>
Co-authored-by: Michał Flendrich <m.flendrich@gmail.com>
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.
Please remove the deepcopy bit (as requested in the attached comment) and this PR is good to go.
Deferring the entire review to @mflendrich here. |
Hi @mflendrich, anything left to do here? |
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.
Looks good now!
@hbagdi, after your comment #62 (comment) , here is my suggestion.