Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is work in progress

Inputs

Image RemovedWhile instance can in theory take a number of forms, in POMBA Casablanca, we shall just support a single name value pair, in the format listed below.

Image Added

Outputs

YAML

Created using https://swagger.io/swagger-editor/

Known issues

  1.   the instance should actually look more like

{

  "instance": [

    {

      "flavor": "vanilla",

    }

  ]

}2. 

  1. Error codes and messages need updating(missing schema, undefined schema, instance validation errors, etc)


Code Block
collapsetrue
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: "stringobject"
          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"

...