-
Notifications
You must be signed in to change notification settings - Fork 71
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
fix: Add custom attribute for OptionValue and OptionLabel and allow empty string #14035
fix: Add custom attribute for OptionValue and OptionLabel and allow empty string #14035
Conversation
93399f2
to
fa36271
Compare
fa36271
to
4c50a5c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14035 +/- ##
=======================================
Coverage 95.32% 95.32%
=======================================
Files 1775 1775
Lines 23128 23128
Branches 2685 2685
=======================================
Hits 22047 22047
Misses 833 833
Partials 248 248 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
eb296b5
to
ab76bf5
Compare
ea1429b
to
4400b7c
Compare
4400b7c
to
971097d
Compare
backend/src/Designer/Helpers/JsonConverterHelpers/OptionConverterHelper.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Great that you also spotted the missing tests and took action. It's a reminder for me to get familiar with code coverage in my editor. But it would be nice if we had code coverage in the pipeline for backend as well 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 🚀
Description
Add new custom
[NotNullable]
attribute forValue
andLabel
fields inOption
class in order to avoid[Required]
attribute that denies empty strings includingnull
. According to the json schemas from Apps that defines Options, empty strings are allowed, so our backend should also allow this.Additional improvements:
OptionsFormatExceptionsFilter
in order to be able to pass informative exceptions when value is assigned an invalid typeValue
andLabel
fields inOption
class to userequired
property that is evaluated during deserialization, which allowed us to remove some customnull
-validation codeRelated Issue(s)
Verification