1---
2swagger: "2.0"
3info:
4  version: "0.1.0"
5  title: issue#859. Reference validation
6  description: more exercising on $ref recursion,default response,items
7paths:
8  /:
9    post:
10      parameters:
11        - $ref: "#/parameters/rateLimit"
12      responses:
13        200:
14          description: "Success"
15    get:
16      parameters:
17        - name: myparam
18          in: body
19          schema:
20            $ref: '#/definitions/myparam'
21      responses:
22        default:
23          description: the record
24          schema:
25            $ref: "#/definitions/record"
26        404:
27          $ref: "#/responses/notFound"
28        200:
29          description: "Success"
30          schema:
31            $ref: "#definitions/myoutput"
32        201:
33          description: "Success"
34          schema:
35            $ref: "#definitions/myoutput"
36
37parameters:
38  rateLimit:
39    name: X-Rate-Limit
40    in: header
41    type: integer
42    format: int32
43
44responses:
45  notFound:
46    description: Not found
47    schema:
48      $ref: "#/definitions/record"
49
50definitions:
51  record:
52    type: object
53    properties:
54      createdAt:
55        type: string
56        format: date-time
57  myparam:
58    type: array
59    items:
60      $ref: "#/definitions/myitems"
61  myoutput:
62    type: array
63    items:
64      # Error: unresolved
65      $ref: "#/definitions/myitem"
66  myitems:
67    type: object
68    properties:
69      ident:
70        type: string
71