Skip to content
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: report allproperties with proper type #985

Merged
merged 2 commits into from
May 11, 2023

Conversation

danielpeintner
Copy link
Member

fixes #984

@danielpeintner danielpeintner requested a review from relu91 May 9, 2023 06:40
@danielpeintner
Copy link
Member Author

Note: readallproperties does not report any value other than JSON. In the test added SVG is not reported. I think this is the best we can do...
@egekorkan maybe also a topic for TD.

@egekorkan
Copy link
Member

I agree that this is a spec issue (even more so than an implementation issue)

@egekorkan
Copy link
Member

See w3c/wot-thing-description#1814 for more discussions

Copy link
Member

@relu91 relu91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely agree this is the best we can do and if properly specified in the spec is not even a problem I think.

What is a little bit weird with the current architecture is that the HTTP server needs to know how to serialize the payload. I would not block this PR for this, but I think in the future we should have a second look.

@@ -549,6 +549,100 @@ class HttpServerTest {
return httpServer.stop();
}

@test async "should report allproperties"() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@test async "should report allproperties"() {
@test async "should report allproperties excluding no json properties"() {

or create two tests with one with only json properties and one like the current version.

Copy link
Member Author

@danielpeintner danielpeintner May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to re-read it multiple times to get it right.. but I think the addition should read
"excluding non-JSON properties"
@relu91 what do you think?

see additional proposed change below

Co-authored-by: danielpeintner <daniel.peintner@gmail.com>
Copy link
Member

@relu91 relu91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Committed changes, ready to go

@danielpeintner danielpeintner merged commit 55a2615 into eclipse-thingweb:master May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

readallproperties wrapping - values as string
3 participants