summaryrefslogtreecommitdiffstats
path: root/docs/openapi
diff options
context:
space:
mode:
Diffstat (limited to 'docs/openapi')
-rw-r--r--docs/openapi/components.yml74
-rw-r--r--docs/openapi/openapi.yml12
2 files changed, 47 insertions, 39 deletions
diff --git a/docs/openapi/components.yml b/docs/openapi/components.yml
index 736639d8..30e5987f 100644
--- a/docs/openapi/components.yml
+++ b/docs/openapi/components.yml
@@ -19,14 +19,15 @@ components:
items:
type: string
- DmiModuleReadRequestBody:
+ ModuleReferencesRequest:
+ type: object
+ properties:
+ cmHandleProperties:
+ $ref: '#/components/schemas/cmHandleProperties'
+
+ ModuleResourcesReadRequest:
type: object
properties:
- operation:
- type: string
- enum: [read]
- dataType:
- type: string
data:
type: object
properties:
@@ -36,14 +37,11 @@ components:
type: object
properties:
name:
- type: string
+ $ref: '#/components/schemas/name'
revision:
- type: string
+ $ref: '#/components/schemas/revision'
cmHandleProperties:
- type: object
- additionalProperties:
- type: string
- example: system-001
+ $ref: '#/components/schemas/cmHandleProperties'
ModuleSet:
type: object
@@ -56,7 +54,7 @@ components:
moduleName:
type: string
revision:
- type: string
+ $ref: '#/components/schemas/revision'
namespace:
type: string
@@ -73,7 +71,7 @@ components:
moduleName:
type: string
revision:
- type: string
+ $ref: '#/components/schemas/revision'
DataAccessReadRequest:
type: object
@@ -82,9 +80,7 @@ components:
type: string
enum: [ read ]
cmHandleProperties:
- type: object
- additionalProperties:
- type: string
+ $ref: '#/components/schemas/cmHandleProperties'
DataAccessWriteRequest:
type: object
@@ -97,9 +93,21 @@ components:
data:
type: string
cmHandleProperties:
- type: object
- additionalProperties:
- type: string
+ $ref: '#/components/schemas/cmHandleProperties'
+
+ cmHandleProperties:
+ type: object
+ additionalProperties:
+ type: string
+ example: {"prop1":"value1","prop2":"value2"}
+
+ name:
+ type: string
+ example: someName
+
+ revision:
+ type: string
+ example: someRevision
responses:
NotFound:
@@ -174,19 +182,21 @@ components:
type: string
enum: [ application/json, application/yang-data+json ]
- fieldsParamInQuery:
- name: fields
+ optionsParamInQuery:
+ name: options
in: query
- description: Fields parameter to filter resource
+ description: options parameter in query, it is mandatory to wrap key(s)=value(s) in parenthesis'()'.
required: false
schema:
type: string
-
- depthParamInQuery:
- name: depth
- in: query
- description: Depth parameter for response
- required: false
- schema:
- type: integer
- minimum: 1 \ No newline at end of file
+ allowReserved: true
+ examples:
+ sample1:
+ value:
+ options: (key1=value1,key2=value2)
+ sample2:
+ value:
+ options: (key1=value1,key2=value1/value2)
+ sample3:
+ value:
+ options: (key1=10,key2=value2,key3=[val31,val32]) \ No newline at end of file
diff --git a/docs/openapi/openapi.yml b/docs/openapi/openapi.yml
index 1e7b38c9..83c05abb 100644
--- a/docs/openapi/openapi.yml
+++ b/docs/openapi/openapi.yml
@@ -37,7 +37,7 @@ paths:
- dmi-plugin
summary: Get all modules for cm handle
description: Get all modules for given cm handle
- operationId: getModulesForCmHandle
+ operationId: getModuleReferences
parameters:
- name: cmHandle
in: path
@@ -50,7 +50,7 @@ paths:
content:
application/json:
schema:
- $ref: 'components.yml#/components/schemas/DataAccessReadRequest'
+ $ref: 'components.yml#/components/schemas/ModuleReferencesRequest'
responses:
'200':
description: OK
@@ -113,7 +113,7 @@ paths:
content:
application/json:
schema:
- $ref: 'components.yml#/components/schemas/DmiModuleReadRequestBody'
+ $ref: 'components.yml#/components/schemas/ModuleResourcesReadRequest'
responses:
'200':
description: OK
@@ -139,8 +139,7 @@ paths:
- $ref: 'components.yml#/components/parameters/cmHandleInPath'
- $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery'
- $ref: 'components.yml#/components/parameters/acceptParamInHeader'
- - $ref: 'components.yml#/components/parameters/fieldsParamInQuery'
- - $ref: 'components.yml#/components/parameters/depthParamInQuery'
+ - $ref: 'components.yml#/components/parameters/optionsParamInQuery'
requestBody:
description: Operational body
content:
@@ -168,8 +167,7 @@ paths:
- $ref: 'components.yml#/components/parameters/cmHandleInPath'
- $ref: 'components.yml#/components/parameters/resourceIdentifierInQuery'
- $ref: 'components.yml#/components/parameters/acceptParamInHeader'
- - $ref: 'components.yml#/components/parameters/fieldsParamInQuery'
- - $ref: 'components.yml#/components/parameters/depthParamInQuery'
+ - $ref: 'components.yml#/components/parameters/optionsParamInQuery'
requestBody:
description: Operational body
content: