You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 7
Next »
The following is an attempt to clarify the data dictionary API that will be used within API to augment the existing validation provided by rules engine + context aggregegated content. This clarifies a subset of the total functionality potentially supported by the data dictionary. The original definition (also potential not complete) is defined in Integration with Data Dictionary.
This is work in progress
![](/download/attachments/38115668/image2018-8-2_11-25-6.png?version=1&modificationDate=1533223506000&api=v2)
Outputs
![](/download/attachments/38115668/image2018-8-2_11-25-49.png?version=1&modificationDate=1533223549000&api=v2)
YAML
Created using https://swagger.io/swagger-editor/
Known issues
- the instance should actually look more like
{
"instance": [
{
"flavor": "vanilla",
}
]
}
2. Error codes and messages need updating(missing schema, undefined schema, instance validation errors
, etc)
swagger: "2.0"
info:
description: "This is the Data Dictionary API"
version: "0.0.1"
title: "Data Dictionary API"
termsOfService: "http://onap.org"
contact:
email: "sharon.chisholm@amdocs.com"
host: "onap.org"
basePath: "/v1"
tags:
- name: "resource"
description: "resource Instances"
externalDocs:
description: "Find out more"
url: "http://onap.org"
schemes:
- "http"
paths:
/commonModelElements/{commonModelElementId}/validateInstance:
post:
summary: "validate against data dictionary"
description: "Data Dictionary validate instance request"
operationId: ""
produces:
- "application/json"
parameters:
- name: "X-ONAP-RequestID"
in: "header"
description: "Transaction identifier to enable end to end tracing"
type: "string"
- name: "X-FromAppId"
in: "header"
description: "Client identifier - MSO, VID, etc"
type: "string"
- name: "commonModelElementId"
in: "path"
required: true
description: "The component or resource type whose attribute we wish to validate"
type: "string"
- in: "body"
name: "body"
description: "Pet object that needs to be added to the store"
required: true
schema:
$ref: "#/definitions/Instance"
responses:
204:
description: "successful operation"
400:
description: "Missing manadatory field in the request or HTTP header."
schema:
type: "array"
items:
type: "string"
example: "instance validation errors"
404:
description: "Error: Requested '%1' resource was not found."
500:
description: "The POST request failed due to internal problem."
security:
- petstore_auth:
- "write:pets"
- "read:pets"
securityDefinitions:
petstore_auth:
type: "oauth2"
authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
flow: "implicit"
scopes:
write:pets: "modify pets in your account"
read:pets: "read your pets"
api_key:
type: "apiKey"
name: "api_key"
in: "header"
definitions:
Instance:
type: "object"
properties:
instance:
type: "array"
items:
type: "string"
example: 'flavour: vanilla'
components:
schemas:
ApiResponse:
type: "object"
properties:
code:
type: "integer"
format: "int32"
type:
type: "string"
message:
type: "string"
externalDocs:
description: "Find out more about Swagger"
url: "http://swagger.io"