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

MissingPackageResult field in CheckPackageVersionUpdateInput made Nullable #485

Merged
merged 3 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changes/unreleased/Bugfix-20241022-093210.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Bugfix
body: 'BREAKING CHANGE: CheckPackageVersionUpdateInput changed to allow MissingPackageResult to be nullable'
time: 2024-10-22T09:32:10.794966-05:00
68 changes: 34 additions & 34 deletions input.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion new_input.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func NullableString(value *string) *Nullable[string] {
return nil
}
if *value == "" {
return NewNull()
return NewNull[string]()
}
return NewNullableFrom(*value)
}
2 changes: 1 addition & 1 deletion scalar.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func IsID(value string) bool {

// NullableConstraint defines what types can be nullable - keep separated using the union operator (pipe)
type NullableConstraint interface {
string
~string
}

// Nullable can be used to unset a value using an OpsLevel input struct type, should always be instantiated using a constructor.
Expand Down
8 changes: 4 additions & 4 deletions service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,10 @@ func TestUpdateService(t *testing.T) {
Input: ol.ServiceUpdateInputV2{
Parent: ol.NewIdentifier(),
Id: ol.NewID("123456789"),
Description: ol.NewNull(),
Framework: ol.NewNull(),
TierAlias: ol.NewNull(),
LifecycleAlias: ol.NewNull(),
Description: ol.NewNull[string](),
Framework: ol.NewNull[string](),
TierAlias: ol.NewNull[string](),
LifecycleAlias: ol.NewNull[string](),
davidbloss marked this conversation as resolved.
Show resolved Hide resolved
},
},
{
Expand Down
Loading