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

Latest Actions Updates #524

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Latest Actions Updates #524

wants to merge 6 commits into from

Conversation

rocktavious
Copy link
Collaborator

Resolves #

Problem

opslevel-go is not up to date with the API spec

Solution

Run the code generator

Checklist

  • I have run this code, and it appears to resolve the stated issue.
  • This PR does not reduce total test coverage
  • This PR has no user interface changes or has already received approval from product management to change the interface.
  • Does this change require a Terraform schema change?
    • If so what is the ticket or PR #
  • Make a changie entry that explains the customer facing outcome of this change

@rocktavious rocktavious requested a review from BigBlue79 March 25, 2025 20:22
@rocktavious rocktavious self-assigned this Mar 25, 2025
@@ -707,6 +714,7 @@ type ContactUpdateInput struct {
type CustomActionsTriggerDefinitionCreateInput struct {
AccessControl *CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl,omitempty" yaml:"accessControl,omitempty" example:"admins"` // The set of users that should be able to use the trigger definition (Optional)
ActionId *Nullable[ID] `json:"actionId,omitempty" yaml:"actionId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The action that will be triggered by the Trigger Definition (Optional)
ApprovalConfig *ApprovalConfigInput `json:"approvalConfig,omitempty" yaml:"approvalConfig,omitempty"` // Config for approval of action (Optional)
Copy link
Collaborator Author

@rocktavious rocktavious Mar 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does support null but @BigBlue79 says it doesn't do what i think it does so leaving it as 3 state instead of support json null.

@@ -747,6 +757,7 @@ type CustomActionsWebhookActionCreateInput struct {

// CustomActionsWebhookActionUpdateInput Inputs that specify the details of a Webhook Action you wish to update
type CustomActionsWebhookActionUpdateInput struct {
Async *Nullable[bool] `json:"async,omitempty" yaml:"async,omitempty" example:"false"` // Whether the action expects an additional, asynchronous response upon completion (Optional)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to test if the state of json null works here to "unset" to the default

Copy link

@eapache-opslevel eapache-opslevel Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, validates: { allow_null: false }

(and in general I think that's the safer assumption?)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, per our slack discussion, this should just be *bool, right?

@@ -737,6 +746,7 @@ type CustomActionsTriggerDefinitionUpdateInput struct {

// CustomActionsWebhookActionCreateInput Specifies the input fields used in the `customActionsWebhookActionCreate` mutation
type CustomActionsWebhookActionCreateInput struct {
Async *bool `json:"async,omitempty" yaml:"async,omitempty" example:"false"` // Whether the action expects an additional, asynchronous response upon completion (Required)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the "(Required)" should probably say "(Optional, defaults to false)"... we should be able to get that out of the generator tbh, the default value is present in the schema

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok i'll see if i can add this

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

Successfully merging this pull request may close these issues.

2 participants