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

WoT 1.1 Support #45

Closed
13 of 14 tasks
lu-zero opened this issue Aug 5, 2022 · 10 comments
Closed
13 of 14 tasks

WoT 1.1 Support #45

lu-zero opened this issue Aug 5, 2022 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@dodomorandi
Copy link
Contributor

dodomorandi commented Aug 8, 2022

There are two parts in the spec noted as "at risk":

The former should not be a problem for us, but the second it is. Can we try to get some information about we should expect? These are "at risk" just because there are not enough implementations. Therefore the actual solution is just to implement them.

@dodomorandi
Copy link
Contributor

Form::op must be validated against a specific subset of operations depending on the context:

  • PropertyAffordance requires that op must be readproperty, writeproperty, observeproperty, unobserveproperty or an array of one or more of these;
  • ActionAffordance requires that op must be invokeaction, queryaction, cancelaction or an array of one or more of these;
  • EventAffordance requires that op must be subscribeevent, unsubscribeevent or an array with both.

At this point, it seems that each different type of affordance uses a different subset of possible operations. This aspect should be thoroughly checked in order to consider splitting the Operation enum in separated enums and keep these check at compile time as much as possible.

@dodomorandi
Copy link
Contributor

There is a harder constrain related to MultiLanguage, which requires that each name must be a valid language tag as defined in BCP47.

@dodomorandi
Copy link
Contributor

DataSchema does not include the default field.

@dodomorandi
Copy link
Contributor

NumberSchema and IntegerSchema are missing:

  • exclusiveMinimum
  • exclusiveMaximum

I see an issue with this, because it is possible to specify a combination of conflicting minimum/exclusiveMinimum and maximum/exclusiveMaximum. We should consider the hypothesis of restricting the possible combinations.

@dodomorandi
Copy link
Contributor

StringSchema is missing:

  • minLength
  • pattern
  • contentEncoding
  • contentMediaType

@dodomorandi
Copy link
Contributor

dodomorandi commented Aug 8, 2022

We currently do not support extending SecuritySchema, but once we start implementing the support, we must keep in mind the following:

The value assigned to the name scheme MUST be defined within a Vocabulary included in the Thing Description, either in the standard Vocabulary defined in § 5. TD Information Model or in a TD Context Extension.

Therefore we need to support extending the basic security schemes without being to lax. Moreover, we need to implement specific support for in field, which has a very specific grammar. This is directly related to the different types of Security schemes.

Last but not least:

The names of URI variables declared in a SecurityScheme MUST be distinct from all other URI variables declared in the TD.

@dodomorandi
Copy link
Contributor

Link is missing:

  • sizes
  • hreflang

There is an additional best practice relation type table, but I am unsure of how we should use it (being a recommendation is not something mandatory, but on the other hand maybe we should support helper methods to follow these recommendations?).

@dodomorandi
Copy link
Contributor

Form::op is missing the following variants:

  • queryaction
  • cancelaction
  • observeallproperties
  • unobserveallproperties
  • subscribeallevents
  • unsubscribeallevents
  • queryallactions

@dodomorandi dodomorandi self-assigned this Aug 9, 2022
@dodomorandi dodomorandi added the enhancement New feature or request label Aug 9, 2022
@lu-zero
Copy link
Contributor Author

lu-zero commented Jan 14, 2023

Stricter validation was not deemed problematic to be a showstopper.

@lu-zero lu-zero closed this as completed Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants