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(core/interactionOutput): support for no-type based root schemas #1309

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

relu91
Copy link
Member

@relu91 relu91 commented Jul 22, 2024

As discussed in #1243 and solved in w3c/wot-scripting-api#534, we now allow more root schema types to be accepted in the value function. The validation still happens but it supports: const, enum, and oneOf. Those terms can now be used instead of type. The behavior of using these terms at the same time is delegated to Ajv.validate function.

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.26%. Comparing base (ee9ebbe) to head (36b3f79).
Report is 5 commits behind head on master.

Files Patch % Lines
packages/core/src/interaction-output.ts 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1309      +/-   ##
==========================================
- Coverage   76.75%   76.26%   -0.49%     
==========================================
  Files          83       82       -1     
  Lines       16058    15946     -112     
  Branches     1621     1603      -18     
==========================================
- Hits        12325    12162     -163     
- Misses       3678     3731      +53     
+ Partials       55       53       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@danielpeintner danielpeintner left a comment

Choose a reason for hiding this comment

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

Looks good.

Question: How can we proceed with the other schema combinations like allOf, anyOf and not ?

@relu91
Copy link
Member Author

relu91 commented Jul 22, 2024

Question: How can we proceed with the other schema combinations like allOf, anyOf and not ?

I had the same question, but I preferred to stick with what was in the Scripting API spec. I think we can easily fix it there and then add them in node-wot later.

@relu91
Copy link
Member Author

relu91 commented Jul 23, 2024

given @danielpeintner 's approval, I'm merging this.

@relu91 relu91 merged commit 8f69a3b into eclipse-thingweb:master Jul 23, 2024
15 checks passed
@VigneshVSV
Copy link

I can confirm this works!

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.

3 participants