From 89b19b1cde0f51320ac6cf9edfa39ed75314b82b Mon Sep 17 00:00:00 2001 From: Ginny Guan Date: Thu, 12 Jan 2023 09:44:31 +0000 Subject: [PATCH] refactor!: Use bool types for command parameters to be more consistent BREAKING CHANGE: ds-pushevent and ds-returnevent to use bool true/false instead of yes/no related: https://github.com/edgexfoundry/go-mod-core-contracts/pull/782 Signed-off-by: Ginny Guan --- internal/controller/http/command_test.go | 2 +- openapi/v2/device-sdk.yaml | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/controller/http/command_test.go b/internal/controller/http/command_test.go index cf111ead4..fcc5b00bd 100644 --- a/internal/controller/http/command_test.go +++ b/internal/controller/http/command_test.go @@ -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() diff --git a/openapi/v2/device-sdk.yaml b/openapi/v2/device-sdk.yaml index 729d183d7..3c8b114b4 100644 --- a/openapi/v2/device-sdk.yaml +++ b/openapi/v2/device-sdk.yaml @@ -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.