swagger: '2.0'
info:
  version: 1.0.0
  title: AWG Facility
  description: Retrieves AWG Facility Information
  termsOfService: 'http://awginc.com/terms/'
  contact:
    name: Swagger API Team
    email: richard.moore@awginc.com
    url: 'http://awginc.com/'
  license:
    name: MIT
    url: 'http://opensource.org/licenses/MIT'
host: 'vdijava:8080'
basePath: /AwgFacilityApi
schemes:
  - http
consumes:
  - application/json
produces:
  - application/json
paths:
  /facility/getByCode:
    get:
      tags:
        - facility
      description: >-
        Returns facility information for all facilities given in the
        comma-separated list.
      operationId: getFacilityByCode
      produces:
        - application/json
      parameters:
        - in: query
          name: codes
          required: true
          uniqueItems: true
          description: Comma-separated list of facility codes.
          type: array
          items:
            type: string
          collectionFormat: csv
      responses:
        '200':
          description: facility response
          schema:
            type: array
            items:
              $ref: '#/definitions/facility'
        default:
          description: unexpected error
          schema:
            $ref: '#/definitions/errorModel'
  /facilities:
    get:
      description: Returns facility information for all facilities.
      operationId: getAllFacilities
      produces:
        - application/json
      responses:
        '200':
          description: facility response
          schema:
            type: array
            items:
              $ref: '#/definitions/facility'
        default:
          description: unexpected error
          schema:
            $ref: '#/definitions/errorModel'
definitions:
  address:
    type: object
    required:
      - street
      - city
      - stateAbbreviation
      - state
      - zipCode
      - zipPlusCode
    properties:
      street:
        type: string
      city:
        type: string
      stateAbbreviation:
        type: string
      state:
        type: string
      zipCode:
        type: string
      zipPlusCode:
        type: string
  facility:
    type: object
    required:
      - code
      - address
      - name
      - oneLetterCode
      - twoLetterCode
      - divisionNumberCode
      - vmFlag
      - corporateName
      - retailVmFlag
      - militaryFlag
    properties:
      code:
        type: string
      address:
        type: object
        items:
          $ref: '#/definitions/address'
      name:
        type: string
      oneLetterCode:
        type: string
      twoLetterCode:
        type: string
      divisionNumberCode:
        type: string
      vmFlag:
        type: boolean
      corporateName:
        type: string
      retailVmFlag:
        type: boolean
      militaryFlag:
        type: boolean
  errorModel:
    type: object
    required:
      - code
      - message
    properties:
      code:
        type: integer
        format: int32
      message:
        type: string
