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

APIClient().GetChecks return null checks #371

Closed
drohlicek opened this issue Jan 19, 2023 · 1 comment · Fixed by #403
Closed

APIClient().GetChecks return null checks #371

drohlicek opened this issue Jan 19, 2023 · 1 comment · Fixed by #403
Assignees
Labels
bug Something isn't working
Milestone

Comments

@drohlicek
Copy link

drohlicek commented Jan 19, 2023

Specifications

  • Client Version: v2.12.0
  • InfluxDB Version: 2.4.0
  • Platform: macOS

Steps to reproduce

var Params = domain.GetChecksParams{OrgID: orgID}
influxClient := influxdb2.NewClientWithOptions(url, token, influxdb2.DefaultOptions().SetUseGZip(true).SetLogLevel(2).SetApplicationName("Testing"))
check, err := influxClient.APIClient().GetChecks(context.Background(), &Params)
if err != nil {
	log.Panic("Error GetChecks")
}
fmt.Printf("%v\n", check.Checks)

code return
&[{<nil>} {<nil>}]

Expected behavior

When I tested with Postman, server reply json response with 2 checks

Actual behavior

code return
&[{<nil>} {<nil>}]

Additional info

No response

@drohlicek drohlicek added the bug Something isn't working label Jan 19, 2023
@vlastahajek
Copy link
Contributor

@drohlicek, thanks for using this client and reporting the issue.
Unfortunately GET Checks response has a complex schema in the server swagger (the allOf construct with discriminator) and the swagger generator produces the wrong structure.
We will try to fix this.

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

Successfully merging a pull request may close this issue.

3 participants