Conversation
Codecov Report
@@ Coverage Diff @@
## master #523 +/- ##
============================================
+ Coverage 73.90% 74.16% +0.25%
- Complexity 2912 2935 +23
============================================
Files 500 502 +2
Lines 11747 11787 +40
Branches 658 661 +3
============================================
+ Hits 8682 8742 +60
+ Misses 2841 2823 -18
+ Partials 224 222 -2 |
# Conflicts: # license-report.md
|
@armiol, @alexander-yevsyukov, PTAL. |
| */ | ||
|
|
||
| package io.spine.code.gen.java; | ||
| package io.spine.type; |
There was a problem hiding this comment.
Why do we change the package?
There was a problem hiding this comment.
Currently the type package contains only few classes that deal with known types.
alexander-yevsyukov
left a comment
There was a problem hiding this comment.
There's only one issue related to the changed package. Please see my question.
| */ | ||
|
|
||
| package io.spine.code.gen.java; | ||
| package io.spine.type; |
There was a problem hiding this comment.
The same question regarding the package as for the class under the test. Why do change the package?
There was a problem hiding this comment.
We move OneofDeclaration from another module. I've changed the package to a more appropriate io.spine.code.proto, which is also the package where the FieldDeclaration resides.
|
@alexander-yevsyukov, PTAL again. |
In this PR we add a new validation option:
(is_required)foroneofgroup fields.Previously, to make a
oneof"required" (i.e. to enforce that one field is always set), the users had to write a(required_field)expression:This approach is error-prone, as the field names may be misspelled, the fields may be added or deleted, etc.
Now, the users can mark the
oneofgroup with a(is_required)option:The second snippet is equivalent to the first one but has less room for accidental errors.
Fixes #521.