You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 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.  The original definition is defined in Integration with Data Dictionary.

This is work in progress

Inputs

Outputs

YAML

Known issues

  1.   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/{commonElementId}/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: "commonElementId"
        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."
        405:
          description: "Method  Not Allowed  :  Invalid HTTP method type used ( PUT,DELETE,POST will be rejected)"
        500:
          description: "The GET request failed either due to internal Context Builder 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"



  • No labels