-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(api): omitempty integration responses fields
Our API Server returns responses that can change 100%, this behavior is making us omit a number of fields if they are empty so that we don't present them to the end user. There is a current bug that this change is fixing where if you try to create a new Lacework Integration with the Go client, the request generated will send the following body and the API Server will through a 500 Internal Server Error (in the k8s logs, Schema validation failure) ``` { "NAME": "Azure Activity Log", "TYPE": "AZURE_AL_SEQ", "ENABLED": 1, "STATE": { "ok": false, "lastUpdatedTime": "", "lastSuccessfulTime": "" }, "DATA": { "CREDENTIALS": {}, "TENANT_ID": "ID", "QUEUE_URL": "URL" } } ``` We are avoiding adding the `STATE` field if it is empty so that we send this request body instead: ``` { "NAME": "Azure Activity Log", "TYPE": "AZURE_AL_SEQ", "ENABLED": 1, "DATA": { "CREDENTIALS": {}, "TENANT_ID": "ID", "QUEUE_URL": "URL" } } ``` Signed-off-by: Salim Afiune Maya <[email protected]>
- Loading branch information
Showing
3 changed files
with
80 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters