summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
1a07fc0)
Issue-ID: CPS-723
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
Change-Id: I1263402595c0f97db7390716fcf8e086edc0a78a
properties:
dmiPlugin:
type: string
properties:
dmiPlugin:
type: string
- example: onap-dmi-plugin
dmiDataPlugin:
type: string
dmiDataPlugin:
type: string
- example: onap-dmi-data-plugin
+ example: my-dmi-data-plugin
dmiModelPlugin:
type: string
dmiModelPlugin:
type: string
- example: onap-dmi-model-plugin
+ example: my-dmi-model-plugin
createdCmHandles:
type: array
items:
$ref: '#/components/schemas/RestCmHandle'
createdCmHandles:
type: array
items:
$ref: '#/components/schemas/RestCmHandle'
+ example: [my-cm-handle1, my-cm-handle2, my-cm-handle3]
updatedCmHandles:
type: array
items:
updatedCmHandles:
type: array
items:
type: array
items:
type: string
type: array
items:
type: string
+ example: [my-cm-handle1, my-cm-handle2, my-cm-handle3]
properties:
cmHandle:
type: string
properties:
cmHandle:
type: string
cmHandleProperties:
$ref: '#/components/schemas/RestCmHandleAdditionalProperties'
RestCmHandleAdditionalProperties:
type: object
additionalProperties:
type: string
cmHandleProperties:
$ref: '#/components/schemas/RestCmHandleAdditionalProperties'
RestCmHandleAdditionalProperties:
type: object
additionalProperties:
type: string
+ example: my-additional-property
items:
type: object
$ref: '#/components/schemas/ModuleNameAsJsonObject'
items:
type: object
$ref: '#/components/schemas/ModuleNameAsJsonObject'
+ example: [my-module-1, my-module-2, my-module-3]
ModuleNameAsJsonObject:
properties:
moduleName:
type: string
ModuleNameAsJsonObject:
properties:
moduleName:
type: string
- example: someModuleName
#Response Schemas
CmHandles:
#Response Schemas
CmHandles:
properties:
cmHandleId:
type: string
properties:
cmHandleId:
type: string
- example: someCmHandleId
+ example: my-cm-handle-id
+
+ examples:
+ dataSampleRequest:
+ summary: Sample request
+ description: Sample request body
+ value:
+ test:bookstore:
+ bookstore-name: Chapters
+ categories:
+ - code: '01'
+ name: SciFi
+ books:
+ - authors:
+ - Iain M. Banks
+ - authors:
+ - Ursula K. Le Guin
+ - code: '02'
+ name: kids
+ books:
+ - authors:
+ - Philip Pullman
+
+ dataSampleResponse:
+ summary: Sample response
+ description: Sample response for selecting 'sample 1'.
+ value:
+ bookstore:
+ categories:
+ - code: '01'
+ books:
+ - {}
+ - {}
+ name: SciFi
+ - code: '02'
+ books:
+ - {}
+ name: kids
+ bookstore-name: Chapters
parameters:
cmHandleInPath:
parameters:
cmHandleInPath:
required: true
schema:
type: string
required: true
schema:
type: string
xpathInQuery:
name: xpath
in: query
xpathInQuery:
name: xpath
in: query
schema:
type: string
examples:
schema:
type: string
examples:
- resourceIdentifier: \parent\child
- sample2:
+ resourceIdentifier: \shops\bookstore
+ sample 2:
- resourceIdentifier: \parent\listElement[key=value]
- sample3:
+ resourceIdentifier: \shops\bookstore\categories[@code=1]
+ sample 3:
- resourceIdentifier: \parent\listElement[key=value]\grandChild
- sample4:
- value:
- resourceIdentifier: parent=1,child=abc
+ resourceIdentifier: parent=shops,child=bookstore
acceptParamInHeader:
name: Accept
in: header
acceptParamInHeader:
name: Accept
in: header
optionsParamInQuery:
name: options
in: query
optionsParamInQuery:
name: options
in: query
- description: options parameter in query, it is mandatory to wrap key(s)=value(s) in parenthesis'()'.
+ description: options parameter in query, it is mandatory to wrap key(s)=value(s) in parenthesis'()'. The format of options parameter depend on the associated DMI Plugin implementation.
required: false
schema:
type: string
allowReserved: true
examples:
required: false
schema:
type: string
allowReserved: true
examples:
- options: (key1=value1,key2=value2)
- sample2:
+ options: (depth=3)
+ sample 2:
- options: (key1=value1,key2=value1/value2)
- sample3:
+ options: (fields=book)
+ sample 3:
- options: (key1=10,key2=value2,key3=[val31;val32])
+ options: (depth=2,fields=book/authors)
contentParamInHeader:
name: Content-Type
in: header
contentParamInHeader:
name: Content-Type
in: header
schema:
type: string
default: application/json
schema:
type: string
default: application/json
+ example: application/yang-data+json
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400
+ message: Not found error message
+ details: Not found error details
Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 401
+ message: Unauthorized error message
+ details: Unauthorized error details
Forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
Forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 403
+ message: Forbidden error message
+ details: Forbidden error details
BadRequest:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
BadRequest:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 400 BAD_REQUEST
+ message: Bad request error message
+ details: Bad request error details
Conflict:
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
Conflict:
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 409 CONFLICT
+ message: Conflict error message
+ details: Conflict error details
NotImplemented:
description: The given path has not been implemented
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
NotImplemented:
description: The given path has not been implemented
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
+ example:
+ status: 501
+ message: Not implemented error message
+ details: Not implemented error details
Ok:
description: OK
content:
Ok:
description: OK
content:
- $ref: 'components.yaml#/components/parameters/optionsParamInQuery'
responses:
200:
- $ref: 'components.yaml#/components/parameters/optionsParamInQuery'
responses:
200:
- $ref: 'components.yaml#/components/responses/Ok'
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ examples:
+ dataSampleResponse:
+ $ref: 'components.yaml#/components/examples/dataSampleResponse'
400:
$ref: 'components.yaml#/components/responses/BadRequest'
401:
400:
$ref: 'components.yaml#/components/responses/BadRequest'
401:
- $ref: 'components.yaml#/components/parameters/optionsParamInQuery'
responses:
200:
- $ref: 'components.yaml#/components/parameters/optionsParamInQuery'
responses:
200:
- $ref: 'components.yaml#/components/responses/Ok'
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ examples:
+ dataSampleResponse:
+ $ref: 'components.yaml#/components/examples/dataSampleResponse'
400:
$ref: 'components.yaml#/components/responses/BadRequest'
401:
400:
$ref: 'components.yaml#/components/responses/BadRequest'
401:
application/json:
schema:
type: string
application/json:
schema:
type: string
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yaml#/components/examples/dataSampleRequest'
application/yang-data+json:
schema:
type: string
application/yang-data+json:
schema:
type: string
application/json:
schema:
type: string
application/json:
schema:
type: string
+ examples:
+ dataSampleRequest:
+ $ref: 'components.yaml#/components/examples/dataSampleRequest'
application/yang-data+json:
schema:
type: string
application/yang-data+json:
schema:
type: string
content:
application/json:
schema:
content:
application/json:
schema:
- type: string
- example: [{"moduleName": "nc-notifications", "revision": "2008-07-14"}]
- $ref: 'components.yaml#/components/responses/Ok'
+ type: object
+ examples:
+ moduleReferencesResponse:
+ summary: Sample response
+ value:
+ - moduleName: my-module-name
+ revision: yyyy-mm-dd
+ - moduleName: my-module-name-2
+ revision: yyyy-mm-dd
400:
$ref: 'components.yaml#/components/responses/BadRequest'
401:
400:
$ref: 'components.yaml#/components/responses/BadRequest'
401: