You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've verified v2.3.0 works for me using oauth2 with a http.Client created by oauth2.Config.Client() using an updated version of my go-aha client (https://github.com/grokify/go-aha). I'll update this and the other auto-generated SDKs I maintain.
I use something like the following now:
cfg:=aha.NewConfiguration()
cfg.HTTPClient=client// generated by oauth2.Config.Client()apiClient:=aha.NewAPIClient(cfg)
featuresApi:=apiClient.FeaturesApi
As a bonus, I noticed that a couple of things are much nicer in 2.3.0:
"type":"string", "format":"date" now results in a string instead of a time.Time.
query parameters are now a map[string]interface{} instead of a sequence of function parameters.
Description
I would like to use
oauth2
with the codegen SDK. This is supported inresty
v1.Issues with codegen SDK reported here:
It seems like 2 changes are needed:
Configuration.Transport
type tohttp.RoundTripper
from*http.Transport
api_client.go
to use"gopkg.in/go-resty/resty.v1"
from"gopkg.in/go-resty/resty.v0"
Swagger-codegen version
https://github.com/grokify/ringcentral-sdk-go-scg/blob/master/swagger_ringcentral_codegen_version.txt
Swagger declaration file content or url
https://github.com/grokify/ringcentral-sdk-go-scg/blob/master/swagger_ringcentral_spec.json
Command line used for generation
https://github.com/grokify/ringcentral-sdk-go-scg/blob/master/swagger_ringcentral_command.sh
Steps to reproduce
Run this code with an unmodified client SDK:
https://github.com/grokify/ringcentral-sdk-go-scg/blob/master/examples/get_extension/get_extension.go
Related issues/PRs
not found
Suggest a fix/enhancement
Configuration.Transport
type*http.Transport
http.RoundTripper
gopkg.in/go-resty/resty.v0
gopkg.in/go-resty/resty.v1
More testing is necessary to ensure
resty.v1
is backward compatible withresty.v0
everywhere used.The text was updated successfully, but these errors were encountered: