-
Notifications
You must be signed in to change notification settings - Fork 67
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
Create new fields in ResourceOperation #114
Comments
Just to unpack this a little bit for further clarity -- The ResourceOperation model needs to implement the Validator interface. Validation in this case will handle a check on each of the deprecated properties to see if they have a value. If not, validation should look to the new property and assign its value to the old property.
The reason for this is that we want to change the Device SDK to use the new properties exclusively. However the core services need to be backward compatible and in a given deployment may still be looking at the old properties. For example if a Fuji device service is calling an Edinburgh core service, the core service won't be aware of these new properties. As described above, we'll mark the old properties as |
I thought the new properties are higher priority, so the logic in validation should be: @tsconn23 and @iain-anderson , if you agree with the logic process, I could help open the PR in go-core-contract and device-sdk-go both. |
New fields: DeviceCommand (json:"deviceCommand") DeviceResource (json:"deviceResource") "Object" to be marked as deprecated (replaced by DeviceResource) "Resource" to be marked as deprecated (replaced by DeviceCommand) Arrangements to be made in marshaling to duplicate values for compatibility purposes. Implement Unmarshaler and Validator interface Add unit test for all of them fix #114 Signed-off-by: Cloud Tsai <cloudxxx8@gmail.com>
As discussed in Device Services WG 24th Jun
New fields:
"Object" to be marked as deprecated (replaced by DeviceResource)
"Resource" to be marked as deprecated (replaced by DeviceCommand)
Arrangements to be made in marshaling to duplicate values for compatibility purposes.
The text was updated successfully, but these errors were encountered: