Skip to content

Conversation

zyfy29
Copy link
Contributor

@zyfy29 zyfy29 commented Sep 27, 2025

BREAKING CHANGE: CustomProperty.DefaultValue was *string but now is any.

Fixes: #3692.
Fixes: #3741.

@gmlewis gmlewis changed the title refactor: Support array type for DefaultValue field refactor!: Support array type for CustomProperty.DefaultValue field Sep 27, 2025
@gmlewis gmlewis added NeedsReview PR is awaiting a review before merging. Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). labels Sep 27, 2025
Copy link

codecov bot commented Sep 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.11%. Comparing base (138500e) to head (6abfd62).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3740   +/-   ##
=======================================
  Coverage   91.11%   91.11%           
=======================================
  Files         187      187           
  Lines       16697    16697           
=======================================
  Hits        15213    15213           
  Misses       1296     1296           
  Partials      188      188           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @zyfy29!
One minor tweak, please, and then we should be ready for a second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear

// Default value of the property.
DefaultValue *string `json:"default_value,omitempty"`
// Default value of the property. Can be null, string or array of strings.
DefaultValue any `json:"default_value,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

@zyfy29 - for the a null to be passed through to the backend, we need to remove the omitempty.
Also, please make sure that there is a unit test where the value is nil (unassigned) so we demonstrate that the null is passed through to the backend.

Suggested change
DefaultValue any `json:"default_value,omitempty"`
DefaultValue any `json:"default_value"`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks!

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @zyfy29!
Could you please make sure all tests and linters pass by running step 4 of CONTRIBUTING.md?

@zyfy29 zyfy29 requested a review from gmlewis September 28, 2025 01:59
@zyfy29
Copy link
Contributor Author

zyfy29 commented Sep 28, 2025

Oh, sorry, now it should be OK

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @zyfy29!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). NeedsReview PR is awaiting a review before merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CustomProperty and DefaultValue of null value is allowed by the API but not the SDK (?) The DefaultValue of a CustomProperty is incorrect type
2 participants