Skip to content

Commit

Permalink
refactor!: Use bool types for command parameters to be more consistent
Browse files Browse the repository at this point in the history
BREAKING CHANGE: ds-pushevent and ds-returnevent to use bool true/false instead of yes/no

related: edgexfoundry/go-mod-core-contracts#782

Signed-off-by: Ginny Guan <[email protected]>
  • Loading branch information
jinlinGuan committed Jan 30, 2023
1 parent 75769cb commit 89b19b1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion internal/controller/http/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func TestRestController_GetCommand_ReturnEvent(t *testing.T) {
require.NoError(t, err)

query := req.URL.Query()
query.Add("ds-returnevent", "no")
query.Add("ds-returnevent", common.ValueFalse)
req.URL.RawQuery = query.Encode()
// Act
recorder := httptest.NewRecorder()
Expand Down
20 changes: 10 additions & 10 deletions openapi/v2/device-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1095,21 +1095,21 @@ paths:
schema:
type: string
enum:
- yes
- no
default: no
example: yes
description: "If set to yes, a successful GET will result in an event being pushed to the EdgeX system"
- true
- false
default: false
example: true
description: "If set to true, a successful GET will result in an event being pushed to the EdgeX system"
- in: query
name: ds-returnevent
schema:
type: string
enum:
- yes
- no
default: yes
example: no
description: "If set to no, there will be no Event returned in the http response"
- true
- false
default: true
example: false
description: "If set to false, there will be no Event returned in the http response"
responses:
'200':
description: String as returned by the device/sensor through the device service.
Expand Down

0 comments on commit 89b19b1

Please sign in to comment.