diff options
author | lukegleeson <luke.gleeson@est.tech> | 2021-11-30 17:06:03 +0000 |
---|---|---|
committer | lukegleeson <luke.gleeson@est.tech> | 2021-12-09 01:03:29 +0000 |
commit | 996152ac6467946e567ca4e76ce78cc3a3ee0371 (patch) | |
tree | 1e1bb45ee491f8ead92c290c06d2e33954bb09e2 /openapi/openapi.yml | |
parent | 1954daa5d31b537a8838d1e11cb41cd6f40b58d9 (diff) |
Add Examples to DMI-Plugin API Spec
Issue-ID: CPS-784
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: I02e450c9c14322fa9c9ac3e14807aeebdb4b9e39
Diffstat (limited to 'openapi/openapi.yml')
-rw-r--r-- | openapi/openapi.yml | 48 |
1 files changed, 30 insertions, 18 deletions
diff --git a/openapi/openapi.yml b/openapi/openapi.yml index 5c095a7a..6605a2df 100644 --- a/openapi/openapi.yml +++ b/openapi/openapi.yml @@ -39,12 +39,7 @@ paths: description: Get all modules for given cm handle operationId: getModuleReferences parameters: - - name: cmHandle - in: path - description: The cm handle to fetch all the modules - required: true - schema: - type: string + - $ref: 'components.yml#/components/parameters/cmHandleInPath' requestBody: description: Operational body content: @@ -58,15 +53,6 @@ paths: application/json: schema: $ref: 'components.yml#/components/schemas/ModuleSet' - example: { - "schemas": [ - { - "moduleName": "example-identifier", - "revision": "example-version", - "namespace": "example-namespace" - } - ] - } '400': $ref: 'components.yml#/components/responses/BadRequest' '401': @@ -120,7 +106,12 @@ paths: required: true responses: '201': - $ref: 'components.yml#/components/responses/Created' + description: Created + content: + text/plain: + schema: + type: string + example: cm-handle registered successfully '400': $ref: 'components.yml#/components/responses/BadRequest' '401': @@ -148,7 +139,15 @@ paths: $ref: 'components.yml#/components/schemas/DataAccessRequest' responses: '200': - $ref: 'components.yml#/components/responses/Ok' + description: OK + content: + application/json: + schema: + type: object + example: + - yangSource: my-yang-source + moduleName: my-module-name + revision: my-revision '400': $ref: 'components.yml#/components/responses/BadRequest' '401': @@ -175,7 +174,20 @@ paths: $ref: 'components.yml#/components/schemas/DataAccessRequest' responses: '201': - $ref: 'components.yml#/components/responses/Created' + description: Created + content: + text/plain: + schema: + type: string + examples: + Read: + value: + - yangSource: my-yang-source + moduleName: my-module-name + revision: my-revision + Write: + value: "Created Resource Name" + '400': $ref: 'components.yml#/components/responses/BadRequest' '401': |