-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Expose functions that allow making generic API calls #549
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
Conversation
if err != nil { | ||
return localVarReturnValue, nil, err | ||
} | ||
|
||
localVarHTTPResponse, err := a.client.callAPI(req) | ||
localVarHTTPResponse, err := a.client.CallAPI(req) |
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.
if prepareRequest, callAPI, etc. are kept lowercase and create the uppercase ones calling the lowercase ones, there won't be so many changes in this PR. (although it's true that at some moment we should leave only the uppercase ones)
@@ -387,7 +387,7 @@ func (c *APIClient) prepareRequest( | |||
return localVarRequest, nil | |||
} | |||
|
|||
func (c *APIClient) makeApiError(res *http.Response, httpMethod, httpPath string) error { | |||
func (c *APIClient) MakeApiError(res *http.Response, httpMethod, httpPath string) error { |
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.
as with the other func we changed, I suggest to keep makeApiError and create MakeApiError calling it so we minimize changes
is good the base branch to be main, or should it be the branch we're using? |
Not intended to be merged at the moment (leaving draft for visibility of needed changes). Eventually we have to make a call if we move forward with exposing these 3 functions or duplicate logic into tf repo. Likely wont make this decision during PoC phase. |
This PR has gone 30 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy! |
closing as this functionality is already in master |
Description
Link to any related issue(s): CLOUDP-303927
NOTE: Explicitly left as draft so it is not merged, branch is currently used for terraform autogeneration PoC in https://github.com/mongodb/terraform-provider-mongodbatlas/tree/CLOUDP-301808-poc-autogeneration
Exposes the following functions from APIClient:
Type of change:
Required Checklist:
make fmt
and formatted my codeFurther comments