-
Notifications
You must be signed in to change notification settings - Fork 81
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
Support Objects in octet-stream codec #1099 #1125
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1125 +/- ##
==========================================
+ Coverage 76.33% 77.36% +1.02%
==========================================
Files 80 80
Lines 16829 17108 +279
Branches 1615 1723 +108
==========================================
+ Hits 12847 13236 +389
+ Misses 3952 3837 -115
- Partials 30 35 +5 ☔ View full report in Codecov by Sentry. |
I add a few more test cases to increase coverage |
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.
I think it is definitely an improvement since we now support objects (once a schema is provided for it)
Note: I only did a quick review but it looks good to me and the additional tests are useful also!
Let's wait till @relu91 or @JKRhb have time to take a look.
BTW, Sorry for not reacting for such a long time
Thanks for the review. |
@relu91 @egekorkan @JKRhb do you have an opinion on that aspect? I think the advantage of having these parameters as URI means one can tweak them at runtime while in the schema case they are fixed. I would even argue that they can be at both places and the URI parameters takes precedence if available.. but I guess this makes it more complex. |
Sadly none of the direction seems to be direction that the standards are developing towards. We will probably have protocol specific keywords for that but I can see why you would want to have these protocol independent since data encoding/coding happens in codec in node-wot, which is not aware of the protocol. I would definitely wait for @relu91 before merging. |
Hi @derwehr! 👋 Having said that we discussed it internally and decided that for now, it is good to merge this PR and leave the refactoring for later. Before merging though I might ask you one final job. Let me clarify one point. Now, I'll do a review of the rest of your implementation and let you know if there is something else to change before merging. |
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.
I skim through the code but it is hard to visually remove the changes that you did for the parameters. I left a couple of comments, but I think I review the code once again when you revert back to the previous handling of content-type parameters. Thanks!
fix: re-add contentType parameter `length`
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.
Thank you very, much for your efforts! We can merge it and try to play with it. As a follow-up work, we should provide a short explanation about the new terms introduced.
See #1099
As a first step, I added
ex:bitLength
andex:bitOffset
to all methods of the codec and extended the tests accordingly.I'll add support for the
object
schema type next. But because I already changed a lot of code, there might be some material for discussion.