Skip to content
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

New main branch SDK doesn't use the intended user agent string format #21

Open
TKIPisalegacycipher opened this issue Mar 6, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@TKIPisalegacycipher
Copy link
Contributor

Prerequisites

  • [*] Have you tested the operation in the API directly? (Yes, this isn't an OAS issue)
  • [*] Do you have the latest SDK version? (Yes, this is a bug found in the code, not from using the library)
  • [*] Review compability matrix (no compatibility issue found)

Describe the bug
In https://github.com/meraki/dashboard-api-go/blob/main/sdk/api_client.go, line 85 reads
c.SetUserAgent("MerakiGolang/2.0.4 Cisco")

This UA string has a couple of issues.

Expected behavior

  1. It should not have 'Cisco' in it (the equivalent Meraki Python SDK doesn't include 'Cisco' and we want to follow that pattern)
  2. If the user doesn't supply any additional string, then it should be formatted go-meraki/{equivalent Meraki OAS revision number}, e.g. go-meraki/1.47.0
  3. The library should allow a user to name their own application/provide their own string, such as ApplicationName VendorName (similar to the python SDK, see line 86 here and line 75 here)
  4. It should include the user's self-defined UA string (e.g. ApplicationName VendorName) so that the full UA string submitted ends up following this format:

go-meraki/1.47.0 ApplicationName VendorName where 1.47.0 is the dashboard API revision for which the library is built

Screenshots
N/A

Environment (please complete the following information):
N/A

Thanks in advance for helping with this.

@TKIPisalegacycipher TKIPisalegacycipher added the bug Something isn't working label Mar 6, 2024
@TKIPisalegacycipher
Copy link
Contributor Author

Note that the community version of the go SDK already uses and should continue to use golang-meraki/* to differentiate.

fmunozmiranda added a commit that referenced this issue Mar 12, 2024
…21

Incorrect links to documentation in code #23 [Removed]
API Rate limiting is not handled in client #20
Refactor api client to adhere to rate limits #25
@fmunozmiranda
Copy link
Collaborator

UserAgent is now custom.
And with format golang-meraki/* at default

fmunozmiranda added a commit that referenced this issue Mar 13, 2024
fmunozmiranda added a commit that referenced this issue Mar 14, 2024
fmunozmiranda added a commit that referenced this issue Mar 14, 2024
- New main branch SDK doesn't use the intended user agent string format #21
- Incorrect links to documentation in code #23 [Removed]
- API Rate limiting is not handled in client #20
- Refactor api client to adhere to rate limits #25
- `AccessPolicyNumber` was absent in response structs of `ResponseSwitchGetNetworkSwitchAccessPolicy` and `ResponseItemSwitchGetNetworkSwitchAccessPolicies`.
@TKIPisalegacycipher
Copy link
Contributor Author

And with format golang-meraki/* at default

This doesn't sound like the right solution, based on my report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants