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

feat!: Remove Notify field out of Device dto and add Properties field into ProvisionWatcher dto #4375

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

judehung
Copy link
Member

@judehung judehung commented Feb 21, 2023

BREAKING CHANGE: Remove Notify field out of Device model/dto

Per edgexfoundry/go-mod-core-contracts#807, the boolean field notify of Device DTO is removed as device creation notification is handled by system event message now.

Per edgexfoundry/go-mod-core-contracts#803, the ProvisionWatcher DTO is updated with a new Properties field.

This commit updates following material to reflect such changes:

  1. update go.mod/go.sum to use go-mod-core-contracts v3.0.0-dev.20
  2. update swagger file correspondingly (remove notify field out of Device dto and add properties field into ProvisionWatcher dto)
  3. update unit test correspondingly

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

New Dependency Instructions (If applicable)

field into ProvisionWatcher dto

BREAKING CHANGE: Remove Notify field out of Device model/dto

Per edgexfoundry/go-mod-core-contracts#807, the boolean field notify of Device DTO is removed as device creation notification is handled by system event message now.  This commit updates following material to reflect such changes:
1. update go.mod/go.sum to use v3.0.0-dev.20
2. update swagger file correspondingly (remove notify field out of Device dto and add properties field into ProvisionWatcher dto)
3. update unit test correspondingly

Signed-off-by: Jude Hung <[email protected]>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@judehung judehung marked this pull request as ready for review February 21, 2023 08:06
Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

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

LGTM

@cloudxxx8 cloudxxx8 merged commit d1220c9 into edgexfoundry:main Feb 21, 2023
judehung added a commit to judehung/edgex-go that referenced this pull request Feb 21, 2023
Three map[string]any fields are recently added into DTOs:
1. tags field of Device DTO
2. properties field of Device DTO
3. properties field of ProvisionWatcher

The proper way to show map[string]any in swagger is like following:
tags:
  tag1:
    field1: "field1Value"
    field2: "field2Value"
  tag2:
    field3: "field3Value"
    field4: "field4Value"
    field5: "field5Value"
However, edgexfoundry#4375 accidentally add extra hyphens like following:

tags:
  - tag1:
      field1: "field1Value"
      field2: "field2Value"
  - tag2:
      field3: "field3Value"
      field4: "field4Value"
      field5: "field5Value"
Those hyphens should be removed for proper map[string] representation.

Signed-off-by: Jude Hung <[email protected]>
judehung added a commit to judehung/edgex-docs that referenced this pull request Feb 22, 2023
Per edgexfoundry/edgex-go#4375 and
edgexfoundry/go-mod-core-contracts#807, the notify field of Device DTO is removed, so that documentation should be updated to remove the notify field as well.

Signed-off-by: Jude Hung <[email protected]>
judehung added a commit to judehung/edgex-docs that referenced this pull request Feb 22, 2023
Per edgexfoundry/edgex-go#4375 and
edgexfoundry/go-mod-core-contracts#807,
the notify field of Device DTO is removed, so that documentation should be
updated to remove the notify field as well.

Signed-off-by: Jude Hung <[email protected]>
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.

2 participants