-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
- Loading branch information
Showing
4 changed files
with
284 additions
and
1 deletion.
There are no files selected for viewing
114 changes: 114 additions & 0 deletions
114
...esources/src/main/resources/openapi/deviceInventory/deviceInventory-scopeId-deviceId.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
openapi: 3.0.2 | ||
|
||
info: | ||
title: Eclipse Kapua REST API - Inventory | ||
version: '1.0' | ||
contact: | ||
name: Eclipse Kapua Dev Team | ||
url: https://eclipse.org/kapua | ||
email: kapua-dev@eclipse.org | ||
license: | ||
name: Eclipse Public License 2.0 | ||
url: https://www.eclipse.org/legal/epl-2.0 | ||
|
||
paths: | ||
/{scopeId}/devices/{deviceId}/inventory: | ||
get: | ||
tags: | ||
- Device Management - Inventory | ||
summary: Get the inventory from a single Device | ||
operationId: deviceInventoryGet | ||
parameters: | ||
- $ref: '../openapi.yaml#/components/parameters/scopeId' | ||
- $ref: '../device/device.yaml#/components/parameters/deviceId' | ||
- $ref: '../device/device.yaml#/components/parameters/timeout' | ||
responses: | ||
200: | ||
description: The inventory from the Device | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './deviceInventory.yaml#/components/schemas/deviceInventory' | ||
401: | ||
$ref: '../openapi.yaml#/components/responses/unauthenticated' | ||
403: | ||
$ref: '../openapi.yaml#/components/responses/subjectUnauthorized' | ||
404: | ||
$ref: '../openapi.yaml#/components/responses/entityNotFound' | ||
500: | ||
$ref: '../openapi.yaml#/components/responses/kapuaError' | ||
/{scopeId}/devices/{deviceId}/inventory/bundles: | ||
get: | ||
tags: | ||
- Device Management - Inventory | ||
summary: Get the bundle inventory from a single Device | ||
operationId: deviceInventoryBundleGet | ||
parameters: | ||
- $ref: '../openapi.yaml#/components/parameters/scopeId' | ||
- $ref: '../device/device.yaml#/components/parameters/deviceId' | ||
- $ref: '../device/device.yaml#/components/parameters/timeout' | ||
responses: | ||
200: | ||
description: The bundle inventory from the Device | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './deviceInventory.yaml#/components/schemas/deviceInventoryBundles' | ||
401: | ||
$ref: '../openapi.yaml#/components/responses/unauthenticated' | ||
403: | ||
$ref: '../openapi.yaml#/components/responses/subjectUnauthorized' | ||
404: | ||
$ref: '../openapi.yaml#/components/responses/entityNotFound' | ||
500: | ||
$ref: '../openapi.yaml#/components/responses/kapuaError' | ||
/{scopeId}/devices/{deviceId}/inventory/system: | ||
get: | ||
tags: | ||
- Device Management - Inventory | ||
summary: Get the system packages inventory from a single Device | ||
operationId: deviceInventorySystemGet | ||
parameters: | ||
- $ref: '../openapi.yaml#/components/parameters/scopeId' | ||
- $ref: '../device/device.yaml#/components/parameters/deviceId' | ||
- $ref: '../device/device.yaml#/components/parameters/timeout' | ||
responses: | ||
200: | ||
description: The system packages inventory from the Device | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './deviceInventory.yaml#/components/schemas/deviceInventorySystemPackages' | ||
401: | ||
$ref: '../openapi.yaml#/components/responses/unauthenticated' | ||
403: | ||
$ref: '../openapi.yaml#/components/responses/subjectUnauthorized' | ||
404: | ||
$ref: '../openapi.yaml#/components/responses/entityNotFound' | ||
500: | ||
$ref: '../openapi.yaml#/components/responses/kapuaError' | ||
/{scopeId}/devices/{deviceId}/inventory/packages: | ||
get: | ||
tags: | ||
- Device Management - Inventory | ||
summary: Get the deployment packages inventory from a single Device | ||
operationId: deviceInventoryPackagesGet | ||
parameters: | ||
- $ref: '../openapi.yaml#/components/parameters/scopeId' | ||
- $ref: '../device/device.yaml#/components/parameters/deviceId' | ||
- $ref: '../device/device.yaml#/components/parameters/timeout' | ||
responses: | ||
200: | ||
description: The deployment packages inventory from the Device | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './deviceInventory.yaml#/components/schemas/deviceInventoryDeploymentPackages' | ||
401: | ||
$ref: '../openapi.yaml#/components/responses/unauthenticated' | ||
403: | ||
$ref: '../openapi.yaml#/components/responses/subjectUnauthorized' | ||
404: | ||
$ref: '../openapi.yaml#/components/responses/entityNotFound' | ||
500: | ||
$ref: '../openapi.yaml#/components/responses/kapuaError' |
160 changes: 160 additions & 0 deletions
160
rest-api/resources/src/main/resources/openapi/deviceInventory/deviceInventory.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
openapi: 3.0.2 | ||
|
||
info: | ||
title: Eclipse Kapua REST API - Device Management - Inventory | ||
version: '1.0' | ||
contact: | ||
name: Eclipse Kapua Dev Team | ||
url: https://eclipse.org/kapua | ||
email: kapua-dev@eclipse.org | ||
license: | ||
name: Eclipse Public License 2.0 | ||
url: https://www.eclipse.org/legal/epl-2.0 | ||
|
||
paths: { } | ||
|
||
components: | ||
schemas: | ||
inventoryItem: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
version: | ||
type: string | ||
itemType: | ||
type: string | ||
example: | ||
name: adduser | ||
version: 3.118 | ||
type: DEB | ||
deviceInventory: | ||
type: object | ||
properties: | ||
inventoryItems: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/inventoryItem' | ||
example: | ||
type: deviceInventory | ||
inventoryItems: | ||
- name: adduser | ||
version: 3.118 | ||
type: DEB | ||
- name: alsa-utils | ||
version: 1.1.8-2 | ||
type: DEB | ||
deviceInventoryBundle: | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
name: | ||
type: string | ||
version: | ||
type: string | ||
status: | ||
type: string | ||
example: | ||
id: 0 | ||
name: org.eclipse.osgi | ||
version: 3.16.0.v20200828-0759 | ||
status: ACTIVE | ||
deviceInventoryBundles: | ||
type: object | ||
properties: | ||
inventoryBundles: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/deviceInventoryBundle' | ||
example: | ||
type: deviceInventoryBundles | ||
inventoryBundles: | ||
- id: 0 | ||
name: org.eclipse.osgi | ||
version: 3.16.0.v20200828-0759 | ||
status: ACTIVE | ||
- id: 1 | ||
name: org.eclipse.equinox.cm | ||
version: 1.4.400.v20200422-1833 | ||
status: RESOLVED | ||
deviceInventorySystemPackage: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
version: | ||
type: string | ||
packageType: | ||
type: string | ||
example: | ||
name: adduser | ||
packageType: DEB | ||
version: 3.118 | ||
deviceInventorySystemPackages: | ||
type: object | ||
properties: | ||
systemPackages: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/deviceInventorySystemPackage' | ||
example: | ||
type: deviceInventorySystemPackages | ||
systemPackages: | ||
- name: adduser | ||
version: 3.118 | ||
type: DEB | ||
- name: alsa-utils | ||
version: 1.1.8-2 | ||
type: DEB | ||
deviceInventoryDeploymentPackage: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
version: | ||
type: string | ||
packageBundles: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/deviceInventoryBundle' | ||
example: | ||
name: org.eclipse.kura.example.beacon | ||
version: 1.0.500 | ||
packageBundles: | ||
- id: 0 | ||
name: org.eclipse.kura.example.beacon | ||
version: 1.0.500 | ||
status: ACTIVE | ||
- id: 1 | ||
name: org.eclipse.kura.example.package | ||
version: 1.5.400 | ||
status: RESOLVED | ||
deviceInventoryDeploymentPackages: | ||
type: object | ||
properties: | ||
systemPackages: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/deviceInventoryDeploymentPackage' | ||
example: | ||
type: deviceInventoryDeploymentPackages | ||
deploymentPackages: | ||
- name: org.eclipse.kura.example.beacon | ||
version: 1.0.500 | ||
packageBundles: | ||
- id: 0 | ||
name: org.eclipse.kura.example.beacon | ||
version: 1.0.500 | ||
status: ACTIVE | ||
- id: 1 | ||
name: org.eclipse.kura.example.package | ||
version: 1.5.400 | ||
status: RESOLVED | ||
- name: org.eclipse.kura.example.heater | ||
version: 1.0.500 | ||
packageBundles: | ||
- id: 0 | ||
name: org.eclipse.kura.example.heater | ||
version: 1.0.500 | ||
status: ACTIVE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters