---
swagger: '2.0'
info:
  description: ''
  version: ''
  title: ''
host: localhost:7777
basePath: "/sample/openapi"
schemes:
- http
paths:
  "/contacts/2":
    get:
      summary: a simple query-operation to demo apiUi
      description: ''
      operationId: queryContactsByName
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: apiuikey
        in: header
        description: some kind of access key
        required: true
        type: string
      - name: qname
        in: query
        description: name to query on
        type: string
        required: true
      responses:
        '200':
          description: Success response
          schema:
            "$ref": "#/definitions/querycontact_rpy"
        '400':
          description: Bad request
          schema:
            "$ref": "#/definitions/badrequest_rpy"
    post:
      summary: a simple create-operation to demo apiUi
      description: ''
      operationId: createContact
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: apiuikey
        in: header
        description: some kind of access key
        required: true
        type: string
      - name: body
        in: body
        description: contact data to store
        required: true
        schema:
          "$ref": "#/definitions/createcontact_req"
      responses:
        '200':
          description: Success response
          schema:
            "$ref": "#/definitions/createcontact_rpy"
        '400':
          description: Bad request
          schema:
            "$ref": "#/definitions/badrequest_rpy"
  "/contacts/2/{contactid}":
    get:
      summary: a simple get-operation to demo apiUi
      description: ''
      operationId: getContactById
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: apiuikey
        in: header
        description: some kind of access key
        required: true
        type: string
      - name: contactid
        in: path
        description: name to query on
        type: string
        required: true
      responses:
        '200':
          description: Success response
          schema:
            "$ref": "#/definitions/getcontact_rpy"
definitions:
  createcontact_req:
    type: object
    properties:
      contactType:
        type: string
        enum: [prospect, suspect, customer, supplier]
      name:
        type: string
      phonenumber:
        type: string
      emailaddress:
        type: string
  createcontact_rpy:
    type: object
    properties:
      contactId:
        type: string
  querycontact_rpy:
    type: object
    properties:
      ListOfcontacts:
        type: object
        properties:
          contact:
            type: array
            items:
             "$ref": "#/definitions/contact"
  getcontact_rpy:
    type: object
    properties:
      contact:
        "$ref": "#/definitions/contact"
  contact:
    type: object
    properties:
      contactId:
        type: string
        description: Unique identifier for a contact. Identifier is automatically determined by the server when you create a contact.
      contactType:
        type: string
        enum: [prospect, suspect, customer, supplier]
      name:
        type: string
      phonenumber:
        type: string
      emailaddress:
        type: string
      created:
        type: string
        format: date-time
  badrequest_rpy:
    type: object
    properties:
      exceptioncode:
        type: string
      exceptiontext:
        type: string
