Skip to content

Commit

Permalink
Merge pull request #670 from judehung/addTotalCount-branch
Browse files Browse the repository at this point in the history
feat: Add totalCount field into multi-instance response DTO
  • Loading branch information
Lenny Goodell authored Oct 19, 2021
2 parents 06c8706 + 99ac5f5 commit cc6dddc
Show file tree
Hide file tree
Showing 59 changed files with 207 additions and 158 deletions.
2 changes: 1 addition & 1 deletion dtos/autoevent.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// AutoEvent and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/AutoEvent
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.1.0#/AutoEvent
type AutoEvent struct {
Interval string `json:"interval" validate:"required,edgex-dto-duration"`
OnChange bool `json:"onChange"`
Expand Down
29 changes: 22 additions & 7 deletions dtos/common/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/edgexfoundry/go-mod-core-contracts/v2/common"
)

// Request defines the base content for request DTOs (data transfer objects).
// BaseRequest defines the base content for request DTOs (data transfer objects).
// This object and its properties correspond to the BaseRequest object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/BaseRequest
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/BaseRequest
type BaseRequest struct {
Versionable `json:",inline"`
RequestId string `json:"requestId" validate:"len=0|uuid"`
Expand All @@ -28,7 +28,7 @@ func NewBaseRequest() BaseRequest {

// BaseResponse defines the base content for response DTOs (data transfer objects).
// This object and its properties correspond to the BaseResponse object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/BaseResponse
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/BaseResponse
type BaseResponse struct {
Versionable `json:",inline"`
RequestId string `json:"requestId,omitempty"`
Expand All @@ -43,7 +43,7 @@ type Versionable struct {

// BaseWithIdResponse defines the base content for response DTOs (data transfer objects).
// This object and its properties correspond to the BaseWithIdResponse object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/BaseWithIdResponse
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/BaseWithIdResponse
type BaseWithIdResponse struct {
BaseResponse `json:",inline"`
Id string `json:"id"`
Expand All @@ -69,17 +69,32 @@ func NewBaseWithIdResponse(requestId string, message string, statusCode int, id
}
}

// BaseWithTotalCountResponse defines the base content for response DTOs (data transfer objects).
// This object and its properties correspond to the BaseWithTotalCountResponse object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/BaseWithTotalCountResponse
type BaseWithTotalCountResponse struct {
BaseResponse `json:",inline"`
TotalCount uint32 `json:"totalCount"`
}

func NewBaseWithTotalCountResponse(requestId string, message string, statusCode int, totalCount uint32) BaseWithTotalCountResponse {
return BaseWithTotalCountResponse{
BaseResponse: NewBaseResponse(requestId, message, statusCode),
TotalCount: totalCount,
}
}

// BaseWithServiceNameResponse defines the base content for response DTOs (data transfer objects).
// This object and its properties correspond to the BaseWithServiceNameResponse object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/system-agent/2.x#/BaseWithServiceNameResponse
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/system-agent/2.1.0#/BaseWithServiceNameResponse
type BaseWithServiceNameResponse struct {
BaseResponse `json:",inline"`
ServiceName string `json:"serviceName"`
}

// BaseWithMetricsResponse defines the base content for response DTOs (data transfer objects).
// This object and its properties correspond to the BaseWithMetricsResponse object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/system-agent/2.x#/BaseWithMetricsResponse
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/system-agent/2.1.0#/BaseWithMetricsResponse
type BaseWithMetricsResponse struct {
BaseResponse `json:",inline"`
ServiceName string `json:"serviceName"`
Expand All @@ -88,7 +103,7 @@ type BaseWithMetricsResponse struct {

// BaseWithConfigResponse defines the base content for response DTOs (data transfer objects).
// This object and its properties correspond to the BaseWithConfigResponse object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/system-agent/2.x#/BaseWithConfigResponse
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/system-agent/2.1.0#/BaseWithConfigResponse
type BaseWithConfigResponse struct {
BaseResponse `json:",inline"`
ServiceName string `json:"serviceName"`
Expand Down
13 changes: 13 additions & 0 deletions dtos/common/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ func TestNewBaseWithIdResponse(t *testing.T) {
assert.Equal(t, expectedId, actual.Id)
}

func TestNewBaseWithTotalCountResponse(t *testing.T) {
expectedRequestId := "123456"
expectedStatusCode := 200
expectedMessage := "unit test message"
expectedTotalCount := uint32(3)
actual := NewBaseWithTotalCountResponse(expectedRequestId, expectedMessage, expectedStatusCode, expectedTotalCount)

assert.Equal(t, expectedRequestId, actual.RequestId)
assert.Equal(t, expectedStatusCode, actual.StatusCode)
assert.Equal(t, expectedMessage, actual.Message)
assert.Equal(t, expectedTotalCount, actual.TotalCount)
}

func TestBaseResponse_Marshal(t *testing.T) {
expectedRequestId := "123456"
expectedStatusCode := 200
Expand Down
2 changes: 1 addition & 1 deletion dtos/common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package common

// ConfigResponse defines the configuration for the targeted service.
// This object and its properties correspond to the ConfigResponse object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/ConfigResponse
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/ConfigResponse
type ConfigResponse struct {
Versionable `json:",inline"`
Config interface{} `json:"config"`
Expand Down
2 changes: 1 addition & 1 deletion dtos/common/count.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package common

// CountResponse defines the Response Content for GET count DTO.
// This object and its properties correspond to the CountResponse object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/CountResponse
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/CountResponse
type CountResponse struct {
BaseResponse `json:",inline"`
Count uint32
Expand Down
2 changes: 1 addition & 1 deletion dtos/common/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Metrics struct {

// MetricsResponse defines the providing memory and cpu utilization stats of the service.
// This object and its properties correspond to the MetricsResponse object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/MetricsResponse
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/MetricsResponse
type MetricsResponse struct {
Versionable `json:",inline"`
Metrics Metrics `json:"metrics"`
Expand Down
2 changes: 1 addition & 1 deletion dtos/common/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// PingResponse defines the content of response content for POST Ping DTO
// This object and its properties correspond to the Ping object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/PingResponse
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/PingResponse
type PingResponse struct {
Versionable `json:",inline"`
Timestamp string `json:"timestamp"`
Expand Down
4 changes: 2 additions & 2 deletions dtos/common/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ package common

// VersionResponse defines the latest version supported by the service.
// This object and its properties correspond to the VersionResponse object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/VersionResponse
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/VersionResponse
type VersionResponse struct {
Versionable `json:",inline"`
Version string `json:"version"`
}

// VersionSdkResponse defines the latest sdk version supported by the service.
// This object and its properties correspond to the VersionSdkResponse object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/VersionSdkResponse
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/VersionSdkResponse
type VersionSdkResponse struct {
VersionResponse `json:",inline"`
SdkVersion string `json:"sdk_version"`
Expand Down
6 changes: 3 additions & 3 deletions dtos/corecommand.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
package dtos

// DeviceCoreCommand and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-command/2.x#/DeviceCoreCommand
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-command/2.1.0#/DeviceCoreCommand
type DeviceCoreCommand struct {
DeviceName string `json:"deviceName" validate:"required,edgex-dto-rfc3986-unreserved-chars"`
ProfileName string `json:"profileName" validate:"required,edgex-dto-rfc3986-unreserved-chars"`
CoreCommands []CoreCommand `json:"coreCommands,omitempty" validate:"dive"`
}

// CoreCommand and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-command/2.x#/CoreCommand
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-command/2.1.0#/CoreCommand
type CoreCommand struct {
Name string `json:"name" validate:"required,edgex-dto-none-empty-string,edgex-dto-rfc3986-unreserved-chars"`
Get bool `json:"get,omitempty" validate:"required_without=Set"`
Expand All @@ -25,7 +25,7 @@ type CoreCommand struct {
}

// CoreCommandParameter and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-command/2.x#/CoreCommandParameter
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-command/2.1.0#/CoreCommandParameter
type CoreCommandParameter struct {
ResourceName string `json:"resourceName"`
ValueType string `json:"valueType"`
Expand Down
4 changes: 2 additions & 2 deletions dtos/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// Device and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/Device
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.1.0#/Device
type Device struct {
DBTimestamp `json:",inline"`
Id string `json:"id,omitempty" validate:"omitempty,uuid"`
Expand All @@ -29,7 +29,7 @@ type Device struct {
}

// UpdateDevice and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/UpdateDevice
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.1.0#/UpdateDevice
type UpdateDevice struct {
Id *string `json:"id" validate:"required_without=Name,edgex-dto-uuid"`
Name *string `json:"name" validate:"required_without=Id,edgex-dto-none-empty-string,edgex-dto-rfc3986-unreserved-chars"`
Expand Down
2 changes: 1 addition & 1 deletion dtos/devicecommand.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package dtos
import "github.com/edgexfoundry/go-mod-core-contracts/v2/models"

// DeviceCommand and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/DeviceCommand
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.1.0#/DeviceCommand
type DeviceCommand struct {
Name string `json:"name" yaml:"name" validate:"required,edgex-dto-none-empty-string,edgex-dto-rfc3986-unreserved-chars"`
IsHidden bool `json:"isHidden" yaml:"isHidden"`
Expand Down
2 changes: 1 addition & 1 deletion dtos/deviceprofile.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

// DeviceProfile and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/DeviceProfile
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.1.0#/DeviceProfile
type DeviceProfile struct {
DBTimestamp `json:",inline"`
Id string `json:"id" validate:"omitempty,uuid"`
Expand Down
2 changes: 1 addition & 1 deletion dtos/deviceresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package dtos
import "github.com/edgexfoundry/go-mod-core-contracts/v2/models"

// DeviceResource and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/DeviceResource
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.1.0#/DeviceResource
type DeviceResource struct {
Description string `json:"description" yaml:"description"`
Name string `json:"name" yaml:"name" validate:"required,edgex-dto-none-empty-string,edgex-dto-rfc3986-unreserved-chars"`
Expand Down
4 changes: 2 additions & 2 deletions dtos/deviceservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// DeviceService and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/DeviceService
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.1.0#/DeviceService
type DeviceService struct {
DBTimestamp `json:",inline"`
Id string `json:"id,omitempty" validate:"omitempty,uuid"`
Expand All @@ -24,7 +24,7 @@ type DeviceService struct {
}

// UpdateDeviceService and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/UpdateDeviceService
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.1.0#/UpdateDeviceService
type UpdateDeviceService struct {
Id *string `json:"id" validate:"required_without=Name,edgex-dto-uuid"`
Name *string `json:"name" validate:"required_without=Id,edgex-dto-none-empty-string,edgex-dto-rfc3986-unreserved-chars"`
Expand Down
2 changes: 1 addition & 1 deletion dtos/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

// Event and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/Event
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/Event
type Event struct {
common.Versionable `json:",inline"`
Id string `json:"id" validate:"required,uuid"`
Expand Down
4 changes: 2 additions & 2 deletions dtos/interval.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// Interval and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.x#/Interval
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.1.0#/Interval
type Interval struct {
DBTimestamp `json:",inline"`
Id string `json:"id,omitempty" validate:"omitempty,uuid"`
Expand All @@ -26,7 +26,7 @@ func NewInterval(name, interval string) Interval {
}

// UpdateInterval and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.x#/UpdateInterval
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.1.0#/UpdateInterval
type UpdateInterval struct {
Id *string `json:"id" validate:"required_without=Name,edgex-dto-uuid"`
Name *string `json:"name" validate:"required_without=Id,edgex-dto-none-empty-string,edgex-dto-rfc3986-unreserved-chars"`
Expand Down
4 changes: 2 additions & 2 deletions dtos/intervalaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// IntervalAction and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.x#/IntervalAction
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.1.0#/IntervalAction
type IntervalAction struct {
DBTimestamp `json:",inline"`
Id string `json:"id,omitempty" validate:"omitempty,uuid"`
Expand All @@ -33,7 +33,7 @@ func NewIntervalAction(name string, intervalName string, address Address) Interv
}

// UpdateIntervalAction and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.x#/UpdateIntervalAction
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.1.0#/UpdateIntervalAction
type UpdateIntervalAction struct {
Id *string `json:"id" validate:"required_without=Name,edgex-dto-uuid"`
Name *string `json:"name" validate:"required_without=Id,edgex-dto-none-empty-string,edgex-dto-rfc3986-unreserved-chars"`
Expand Down
2 changes: 1 addition & 1 deletion dtos/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// Notification and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-notifications/2.x#/Notification
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-notifications/2.1.0#/Notification
type Notification struct {
DBTimestamp `json:",inline"`
Id string `json:"id,omitempty" validate:"omitempty,uuid"`
Expand Down
4 changes: 2 additions & 2 deletions dtos/provisionwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// ProvisionWatcher and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/ProvisionWatcher
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.1.0#/ProvisionWatcher
type ProvisionWatcher struct {
DBTimestamp `json:",inline"`
Id string `json:"id,omitempty" validate:"omitempty,uuid"`
Expand All @@ -25,7 +25,7 @@ type ProvisionWatcher struct {
}

// UpdateProvisionWatcher and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/UpdateProvisionWatcher
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.1.0#/UpdateProvisionWatcher
type UpdateProvisionWatcher struct {
Id *string `json:"id" validate:"required_without=Name,edgex-dto-uuid"`
Name *string `json:"name" validate:"required_without=Id,edgex-dto-none-empty-string,edgex-dto-rfc3986-unreserved-chars"`
Expand Down
8 changes: 4 additions & 4 deletions dtos/reading.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

// BaseReading and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/BaseReading
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/BaseReading
type BaseReading struct {
Id string `json:"id,omitempty"`
Origin int64 `json:"origin" validate:"required"`
Expand All @@ -32,20 +32,20 @@ type BaseReading struct {
}

// SimpleReading and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/SimpleReading
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/SimpleReading
type SimpleReading struct {
Value string `json:"value,omitempty" validate:"required"`
}

// BinaryReading and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/BinaryReading
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/BinaryReading
type BinaryReading struct {
BinaryValue []byte `json:"binaryValue,omitempty" validate:"gt=0,required"`
MediaType string `json:"mediaType,omitempty" validate:"required"`
}

// ObjectReading and its properties are defined in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/ObjectReading
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.1.0#/ObjectReading
type ObjectReading struct {
ObjectValue interface{} `json:"objectValue,omitempty" validate:"required"`
}
Expand Down
4 changes: 2 additions & 2 deletions dtos/requests/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

// AddDeviceRequest defines the Request Content for POST Device DTO.
// This object and its properties correspond to the AddDeviceRequest object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/AddDeviceRequest
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.1.0#/AddDeviceRequest
type AddDeviceRequest struct {
dtoCommon.BaseRequest `json:",inline"`
Device dtos.Device `json:"device"`
Expand Down Expand Up @@ -59,7 +59,7 @@ func AddDeviceReqToDeviceModels(addRequests []AddDeviceRequest) (Devices []model

// UpdateDeviceRequest defines the Request Content for PUT event as pushed DTO.
// This object and its properties correspond to the UpdateDeviceRequest object in the APIv2 specification:
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/UpdateDeviceRequest
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.1.0#/UpdateDeviceRequest
type UpdateDeviceRequest struct {
dtoCommon.BaseRequest `json:",inline"`
Device dtos.UpdateDevice `json:"device"`
Expand Down
Loading

0 comments on commit cc6dddc

Please sign in to comment.