...
1---
2swagger: "2.0"
3schemes:
4 - "http"
5 - "https"
6basePath: "/v1.24"
7info:
8 title: "derived from Pouch Engine API"
9 version: "1.24"
10 description: A variation on issue go-swagger/go-swagger#1609
11paths:
12 /_pong:
13 get:
14 parameters:
15 - $ref: '#/parameters/anotherBodyWithRef'
16 responses:
17 200:
18 description: "no error"
19 schema:
20 type: "string"
21 example: "OK"
22 401:
23 $ref: "#/responses/401ErrorResponse"
24 404:
25 description: direct ref
26 schema:
27 $ref: "#/definitions/Error"
28 500:
29 $ref: "#/responses/500ErrorResponse"
30 501:
31 description: faulty ref with wrong object type
32 schema:
33 $ref: "#/responses/500ErrorResponse"
34
35definitions:
36 Error:
37 type: "object"
38 properties:
39 message:
40 type: string
41
42parameters:
43 bodyWithRef:
44 name: bodyWithRefParam
45 in: body
46 schema:
47 $ref: "#/definitions/Error"
48 nobodyWithRef:
49 name: bodyWithRefParam
50 in: query
51 type: integer
52 #required: true
53 anotherBodyWithRef:
54 name: anotherBodyWithRefParam
55 in: body
56 schema:
57 $ref: "#/definitions/Error"
58 funnyParam:
59 name: funnyParam
60 in: body
61 schema:
62 $ref: "#/responses/500ErrorResponse/schema"
63
64responses:
65 401ErrorResponse:
66 description: An unexpected 401 error occurred.
67 schema:
68 $ref: "#/definitions/Error"
69 404ErrorResponse:
70 description: An unexpected 404 error occurred.
71 schema:
72 $ref: "#/definitions/Error"
73 500ErrorResponse:
74 description: An unexpected server error occurred.
75 schema:
76 $ref: "#/definitions/Error"
77 funnyResponse:
78 description: An unexpected server error occurred.
79 schema:
80 $ref: "#/responses/401ErrorResponse/schema"
81 foulResponse:
82 description: An unexpected server error occurred.
83 schema:
84 $ref: "#/responses/noSchemaResponse"
85 noSchemaResponse:
86 description: An unexpected server error occurred.
View as plain text