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: Remove extra hyphen out of the core-metadata.yaml #4378

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

judehung
Copy link
Member

@judehung judehung commented 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, #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.

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)

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 judehung requested a review from cloudxxx8 February 21, 2023 12:31
@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

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 76c26b6 into edgexfoundry:main Feb 21, 2023
@cloudxxx8
Copy link
Member

I just noticed the commit should start with "docs:", not "fix:"

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