---
swagger: "2.0"
info:
  version: "0.1.0"
  title: reference analysis

parameters:
  someParam:
    name: some
    in: query
    type: string
responses:
  notFound:
    description: "Not Found"
    schema:
      $ref: "external/errors.yml#/error"

paths:
  "/some/where/{id}":
    parameters:
      - $ref: "external/parameters.yml#/parameters/idParam"

    get:
      parameters:
      - $ref: "external/parameters.yml#/parameters/limitParam"
      - $ref: "#/parameters/someParam" 
      - name: other
        in: query
        type: string
      - $ref: "external/nestedParams.yml#/bodyParam"

      responses:
        default:
          $ref: "external/nestedResponses.yml#/genericResponse"
        404:
          $ref: "#/responses/notFound"
        200:
          description: "RecordHolder"
          schema:
            type: object
            properties:
              record:
                $ref: "external/definitions.yml#/definitions/nestedThing"
  "/other/place":
    $ref: "external/pathItem.yml"

definitions:
  namedAgain:
    $ref: "external/definitions.yml#/definitions/named"

  datedTag:
    allOf:
      - type: string
        format: date
      - $ref: "external/definitions.yml#/definitions/tag"
  
  records:
    type: array
    items:
      - $ref: "external/definitions.yml#/definitions/record"

  datedRecords:
    type: array
    items:
      - type: string
        format: date-time
      - $ref: "external/definitions.yml#/definitions/record"
    
  otherRecords:
    type: array
    items:
      $ref: "external/definitions.yml#/definitions/record"
  
  tags:
    type: object
    additionalProperties:
      $ref: "external/definitions.yml#/definitions/tag"

  namedThing:
    type: object
    properties:
      name:
        $ref: "external/definitions.yml#/definitions/named"
      namedAgain:
        $ref: "#/definitions/namedAgain"
