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: Use URL escape for DTO name field #853

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

weichou1229
Copy link
Member

Use URL escape for DTO name field, including

  • device name
  • profile name
  • service name
  • interval and interval action name
  • provision watcher name
  • subscription name

Close #850

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

PR Checklist

Please check if your PR fulfills the following requirements:

  • [v] I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • [v] I am not introducing a new dependency (add notes below if you are)
  • [v] I have added unit tests for the new feature or bug fix (if not, why?)
  • [v] 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?) not impact

Testing Instructions

Test core metadata API to verify the deviceName or serviceName accept URL escape.

New Dependency Instructions (If applicable)

@cloudxxx8
Copy link
Member

do we still need edgex-dto-rfc3986-unreserved-chars validation fucntion?

@weichou1229
Copy link
Member Author

There are DTOs still using the edgex-dto-rfc3986-unreserved-chars.
https://github.com/edgexfoundry/go-mod-core-contracts/blob/main/dtos/subscription.go
https://github.com/edgexfoundry/go-mod-core-contracts/blob/main/dtos/notification.go
Maybe we can also remove these restrictions?

@cloudxxx8
Copy link
Member

ok, let's keep it as is

dtos/requests/interval_test.go Outdated Show resolved Hide resolved
dtos/requests/intervalaction_test.go Outdated Show resolved Hide resolved
Use URL escape for DTO name field, including
- device name
- profile name
- service name
- interval and interval action name
- provision watcher name
- subscription name

Close edgexfoundry#850

Signed-off-by: bruce <weichou1229@gmail.com>
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 171c2b7 into edgexfoundry:main Sep 5, 2023
3 checks passed
@weichou1229 weichou1229 deleted the issue-850 branch September 6, 2023 02:07
weichou1229 added a commit to IOTechSystems/go-mod-core-contracts that referenced this pull request Mar 6, 2024
Remove the DTO name restriction as community changes, edgexfoundry/go-mod-core-contracts#853.

Signed-off-by: bruce <weichou1229@gmail.com>
weichou1229 added a commit to IOTechSystems/go-mod-core-contracts that referenced this pull request Mar 6, 2024
Remove the DTO name restriction as community changes, edgexfoundry/go-mod-core-contracts#853.

Signed-off-by: bruce <weichou1229@gmail.com>
weichou1229 added a commit to IOTechSystems/go-mod-core-contracts that referenced this pull request Mar 6, 2024
Remove the DTO name restriction as community changes, edgexfoundry/go-mod-core-contracts#853.

Signed-off-by: bruce <weichou1229@gmail.com>
weichou1229 added a commit to IOTechSystems/go-mod-core-contracts that referenced this pull request Mar 6, 2024
Remove the DTO name restriction as community changes, edgexfoundry/go-mod-core-contracts#853.

Signed-off-by: bruce <weichou1229@gmail.com>
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.

feat: Use URL escape for DTO name field
2 participants