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

Added 'Device.extendedProperties' to OpenAPI definition file #3307

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,16 @@ paths:
jvmVersion: 24.111-b01 mixed mode
osgiFrameworkVersion: 1.7.0
acceptEncoding: gzip
tagIds: []
extendedProperties:
- type: deviceExtendedProperty
groupName: Hardware Info
name: CPU Family
value: ARM
- type: deviceExtendedProperty
groupName: Hardware Info
name: CPU Cores
value: 4
tagIds: [ ]
required: true
responses:
200:
Expand Down
71 changes: 50 additions & 21 deletions rest-api/resources/src/main/resources/openapi/device/device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ info:
name: Eclipse Public License 2.0
url: https://www.eclipse.org/legal/epl-2.0

paths: {}
paths: { }

components:
parameters:
Expand Down Expand Up @@ -138,32 +138,46 @@ components:
customAttribute5:
description: A Custom Attirbute of this Device - 5
type: string
extendedProperties:
type: array
items:
allOf:
- $ref: '#/components/schemas/deviceExtendedProperty'
tagIds:
type: array
items:
allOf:
- $ref: '../openapi.yaml#/components/schemas/kapuaId'
example:
type: device
id: dIVxI5QpFUI
scopeId: AQ
createdOn: '2019-09-12T12:08:12.179Z'
createdBy: AQ
modifiedOn: '2019-09-12T12:08:12.179Z'
modifiedBy: AQ
optlock: 1
clientId: testDevice
status: ENABLED
displayName: Test Device
serialNumber: 1234567890
modelId: Test Model
biosVersion: N/A
firmwareVersion: N/A
osVersion: 3.13.0-93-generic
jvmVersion: 24.111-b01 mixed mode
osgiFrameworkVersion: 1.7.0
acceptEncoding: gzip
tagIds: []
type: device
id: dIVxI5QpFUI
scopeId: AQ
createdOn: '2019-09-12T12:08:12.179Z'
createdBy: AQ
modifiedOn: '2019-09-12T12:08:12.179Z'
modifiedBy: AQ
optlock: 1
clientId: testDevice
status: ENABLED
displayName: Test Device
serialNumber: 1234567890
modelId: Test Model
biosVersion: N/A
firmwareVersion: N/A
osVersion: 3.13.0-93-generic
jvmVersion: 24.111-b01 mixed mode
osgiFrameworkVersion: 1.7.0
acceptEncoding: gzip
extendedProperties:
- type: deviceExtendedProperty
groupName: Hardware Info
name: CPU Family
value: ARM
- type: deviceExtendedProperty
groupName: Hardware Info
name: CPU Cores
value: 4
tagIds: [ ]
deviceCreator:
allOf:
- $ref: '../openapi.yaml#/components/schemas/kapuaUpdatableEntityCreator'
Expand Down Expand Up @@ -259,6 +273,21 @@ components:
- DELETE
- OPTIONS
- EXECUTE
deviceExtendedProperty:
allOf:
- type: object
properties:
groupName:
type: string
name:
type: string
value:
type: string
example:
type: deviceExtendedProperty
groupName: Hardware Info
name: CPU Family
value: ARM
event:
allOf:
- $ref: '../openapi.yaml#/components/schemas/kapuaEntity'
Expand Down