-
Notifications
You must be signed in to change notification settings - Fork 27
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
External tag #316
base: master
Are you sure you want to change the base?
External tag #316
Conversation
As I mentioned earlier, there are some style issues.
|
@dahlia @Kroisse Could you all review the idea of this PR regardless of the failing of CI? We decided to support external tag by adding |
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.
Annotations available to (virtually) every target should be documented in docs/annotation.md file as well (besides docs/serialization.md file).
@@ -10,6 +10,12 @@ To be released. | |||
|
|||
- The `uri` type has completly gone; use `url` instead. | |||
[[#126], [#281] by Jonghun Park] | |||
- Support [external_tag][etag] via '@external-tag' annotation. |
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.
Changelogs should be the past tense. Also the following explanation does not have enough information:
external_tag via '@external-tag' annotation
docs/serialization.md
Outdated
@@ -250,6 +250,27 @@ It's represented in JSON to: | |||
In a similar way to a record type, undefined fields in a payload are ignored | |||
by deserializer. | |||
|
|||
If '@external-tag' annotation is given on tag below example |
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.
A trailing colon is missing.
@@ -37,7 +37,8 @@ union shape | |||
point upper-left, | |||
point lower-right | |||
) | |||
| circle (point origin, offset radius) | |||
| @external-tag |
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.
Should the @external-tag
annotation be applied to tags, not union types? Does that mean some tags could be serialized as external-tag-style while some other tags are still serialized with "_tag"
field at a time?
{ | ||
"east-asian-name": { | ||
"_type": "name", | ||
"_tag": "east-asian-name", |
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.
This field might be not necessary, because it already presented above.
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.
And, I think @external-tag
should be associated on the whole union, not on its tag. If not, it loses the advantage that can be decide which tag should be parsed at once.
Codecov Report
@@ Coverage Diff @@
## master #316 +/- ##
==========================================
+ Coverage 76.22% 76.26% +0.04%
==========================================
Files 34 34
Lines 2902 2903 +1
Branches 194 196 +2
==========================================
+ Hits 2212 2214 +2
+ Misses 496 493 -3
- Partials 194 196 +2
Continue to review full report at Codecov.
|
Adopt
external-tag
to serialized union values