Skip to content

GetAlertRulesExport returns a unmarshal error #110

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

Open
ev-gusev opened this issue Dec 17, 2024 · 1 comment
Open

GetAlertRulesExport returns a unmarshal error #110

ev-gusev opened this issue Dec 17, 2024 · 1 comment

Comments

@ev-gusev
Copy link

When calling the GetAlertRulesExport method I get an error

*encoding/json.UnmarshalTypeError {Value: “string”, Type: reflect.Type(*reflect.rtype) *{t: (*“internal/abi.Type”)(0x1058d7ca0)}, Offset: 120, Struct: “AlertRuleGroupExport”, Field: “groups.interval”}

What am I doing wrong?
Example code:

	format := "json"
	res, err := g.provisioningClient.GetAlertRulesExport(prov.NewGetAlertRulesExportParams().WithFormat(&format))
@safaci2000
Copy link
Contributor

I have a PR to fix that but it hasn't been merged in yet. #102.

Basically the schema.json uses an incorrect data type declaration and it fails to Marshall the data. Try using my branch if it works and if you can poke the maintainers maybe we can get this merged into the main that'd be even better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants