...
1# This spec should be correctly detected as invalid
2swagger: '2.0'
3info:
4 title: issue-1238
5 version: 0.0.1
6 license:
7 name: MIT
8host: localhost:8081
9basePath: /api/v1
10schemes:
11 - http
12consumes:
13 - application/json
14produces:
15 - application/json
16paths:
17 '/servers/{server_id}/zones':
18 get:
19 operationId: listZones
20 tags:
21 - zones
22 parameters:
23 - name: server_id
24 in: path
25 required: true
26 type: string
27 responses:
28 '200':
29 description: An array of Zones
30 schema:
31 $ref: '#/definitions/Zones'
32
33 '/servers/{server_id}/zones/{zone_id}':
34 get:
35 operationId: listZone
36 tags:
37 - zones
38 parameters:
39 - name: server_id
40 in: path
41 required: true
42 type: string
43 - name: zone_id
44 type: string
45 in: path
46 required: true
47 responses:
48 '200':
49 description: A Zone
50 schema:
51 $ref: '#/definitions/Zone'
52
53
54definitions:
55 Zones:
56 type: array
57 items:
58 $ref: '#/definitions/Zone'
59
60 Zone:
61 type: object
62 properties:
63 name:
64 type: string
65 RR:
66 $ref: '#/definitions/RRSets'
67
68 RRSets:
69 # Declaring items for an object should be correctly assessed as invalid and not trigger a panic (issue#1238)
70 type: object
71 items:
72 $ref: '#/definitions/RRSet'
73
74 RRSet:
75 properties:
76 name:
77 type: string
View as plain text