Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor!: Support array type for CustomProperty.DefaultValue field #3740

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
zyfy29 wants to merge 4 commits into google:master
base: master
Choose a base branch
Loading
from zyfy29:defaultvalue-any-type

Conversation

@zyfy29
Copy link
Contributor

@zyfy29 zyfy29 commented Sep 27, 2025
edited by gmlewis
Loading

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
edited
Loading

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!

gmlewis reacted with heart emoji
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?

Copy link
Contributor Author

zyfy29 commented Sep 28, 2025

Oh, sorry, now it should be OK

gmlewis reacted with heart emoji

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

Copy link
Contributor

@stevehipwell stevehipwell left a comment

Choose a reason for hiding this comment

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

I don't think I agree with the API design for this, I was planning on having this discussion on the issue when I had time to pick it up or someone else wanted to. This comment is to hold the PR while we discuss the implementation in #3692.

Copy link
Collaborator

gmlewis commented Sep 29, 2025

I don't think I agree with the API design for this, I was planning on having this discussion on the issue when I had time to pick it up or someone else wanted to. This comment is to hold the PR while we discuss the implementation in #3692.

Ah, OK. Let's put this PR on hold then while it is being discussed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gmlewis gmlewis gmlewis approved these changes

+1 more reviewer

@stevehipwell stevehipwell stevehipwell requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). DO NOT MERGE Do not merge this PR. NeedsDecision NeedsInvestigation NeedsReview PR is awaiting a review before merging.

Projects

None yet

Milestone

No milestone

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

AltStyle によって変換されたページ (->オリジナル) /