Skip to content

Commit

Permalink
fix: Update swagger to match latest changes in go-mod-core-contracts …
Browse files Browse the repository at this point in the history
…Device dto

Per edgexfoundry/go-mod-core-contracts#800, the
Device DTO is added with a new field "Properties", so the swagger file needs to be updated correspondingly.

Moreover, this commit also updates the swagger file to remove those fields that had been taken out of Device DTO before:
- created
- modified
- serviceId
- profileId

This commit also adds back a newly created field "tags" into the Device DTO.

Signed-off-by: Jude Hung <[email protected]>
  • Loading branch information
judehung committed Feb 18, 2023
1 parent f03d932 commit 05593f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
1 change: 1 addition & 0 deletions openapi/v3/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ API changes from v2
* Remove /callback/watcher endpoints
* Remove /callback/service endpoints
* Rename path on SecretRequest to secretName
* Rename the NewDeviceRequest to DeviceValidationRequest, and add "tags" and "properties" fields into the schema of DeviceValidationRequest
22 changes: 8 additions & 14 deletions openapi/v3/device-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ components:
type: string
format: uuid
description: "The unique identifier of the device"
created:
type: integer
description: "A Unix timestamp indicating when the object was initially persisted to a database"
modified:
type: integer
description: "A Unix timestamp indicating when the object was last modified"
name:
type: string
description: "The name of the device"
Expand All @@ -95,15 +89,9 @@ components:
location:
type: object
description: "Device service specific location information"
serviceId:
type: string
description: "Associated device service referenced by id"
serviceName:
type: string
description: "Associated device service referenced by name"
profileId:
type: string
description: "Associated device profile referenced by id"
profileName:
type: string
description: "Associated device profile referenced by name"
Expand All @@ -116,6 +104,12 @@ components:
type: object
additionalProperties:
$ref: '#/components/schemas/ProtocolProperties'
tags:
type: object
description: "A map of tags used to tag the given device."
properties:
type: object
description: "A map of properties required to address the given device."
BaseReading:
description: "A base reading type containing common properties from which more specific reading types inherit. This definition should not be implemented but is used elsewhere to indicate support for a mixed list of simple/binary readings in a single event."
type: object
Expand Down Expand Up @@ -247,7 +241,7 @@ components:
config:
description: "An object containing the service''s configuration. Please refer to Core Data''s configuration documentation for more details at [EdgeX Foundry Documentation](https://docs.edgexfoundry.org)."
type: object
NewDeviceRequest:
DeviceValidationRequest:
allOf:
- $ref: '#/components/schemas/BaseRequest'
description: "Notification that a new device associated with this device service has been created."
Expand Down Expand Up @@ -556,7 +550,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/NewDeviceRequest'
$ref: '#/components/schemas/DeviceValidationRequest'
required: true
responses:
'200':
Expand Down

0 comments on commit 05593f9

Please sign in to comment.