title: Swagger UI 2.1 Stuck "fetching resource list"
body: <p>I have a RESTful API that I have created recently and I won't remember how to use it in a few months. I decided to document my API using Swagger, however I'm going crazy.</p>
  
  <p>I used <a href="http://editor.swagger.io/" rel="noreferrer">http://editor.swagger.io/</a> to create the YAML file that I then convert into a JSON file Swagger can use. When I put file into Swagger UI it just gets stuck at <code>fetching resource list: localhost/swagger.json</code> and the console says <code>Uncaught TypeError: Cannot read property '$ref' of undefined </code>.</p>
  
  <p><img src="https://i.stack.imgur.com/p0ZMN.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/eAvdw.png" alt="enter image description here"></p>
  
  <p>I'm using version 2.1.0-alpha.5 of Swagger UI.</p>
  
  <p>Here is my spec file:</p>
  
  <pre>
  swagger: '2.0'
  info:
    title: TITLE
    description: BLAH, BLAH, BLAH, ETC
    version: "1.0b"
  host: api.example.com
  schemes:
   - http
  basePath: /v1
  produces:
   - application/json
  paths:
    /match.json:
      get:
       #summary: Match Data
        description: Used for getting data about a match
        parameters:
          - name: id
            in: query
            description: The match ID of from a game
            required: true
            type: integer
            format: int32
          - name: key
            in: query
            description: API key used for authentication.
            required: true
            type: string
        responses:
          200:
            description: Returns match data
            schema:
              type: array
              items:
                $ref: '#/definitions/MatchData'
          default:
            description: Unexpected error
            schema:
              $ref: '#/definitions/Error'
  
  definitions:
    MatchData:
      properties:
        info:
          type: integer
          format: int64
          description: General information about the match
        time:
          type: integer
          format: int64
          description: Information about the start/end time
        stats:
          type: array
          format: int64
          description: Stats about the match
    Error:
      required:
       - errorID
        - message
      properties:
        errorID:
          type: string
          description: Error ID.
        message:
          type: string
          description: Information about the error.
  </pre>