Allow Strings and URIs for the @Link annotation when serializing#27
Allow Strings and URIs for the @Link annotation when serializing#27andreas-repp wants to merge 2 commits intoopenapi-tools:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #27 +/- ##
============================================
+ Coverage 77.27% 77.52% +0.25%
Complexity 63 63
============================================
Files 10 10
Lines 352 356 +4
Branches 67 69 +2
============================================
+ Hits 272 276 +4
Misses 72 72
Partials 8 8
Continue to review full report at Codecov.
|
|
@langecode: Could you have a look at this PR? |
langecode
left a comment
There was a problem hiding this comment.
Thanks for the contribution and it makes sense to be able to annotate an URI as HALLink. I think there is a semantic problem with the string version, though. The Java URI class does not support template URIs so it obviously must be non-templated. However, the string could both be templated or not templated and it is not possible to distinguish. I guess this could have been solved by adding an attribute to the annotation - however that could cause a conflict with the current us of HALLink which carries this information.
I will give it some thought if there is a good way to handle the annotated strings.
| @EmbeddedResource | ||
| public String nullString = null; | ||
|
|
||
| public TopResource() throws URISyntaxException { |
There was a problem hiding this comment.
Why add the default constructor?
|
..and again thanks for the contribution. I had not noticed your PR before the mention, sorry. |
With this PR, it becomes possible to use the
@Linkannotation with Strings and URIs making the library less intrusive and easier to use.Code Example: