...
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 /_pang:
13 get:
14 parameters:
15 - $ref: '#/parameters/funnyParam'
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 $ref: "#/responses/404ErrorResponse"
26 500:
27 $ref: "#/responses/500ErrorResponse"
28 501:
29 $ref: "#/responses/funnyResponse"
30
31definitions:
32 Error:
33 type: "object"
34 properties:
35 message:
36 type: string
37
38parameters:
39 bodyWithRef:
40 name: bodyWithRefParam
41 in: body
42 schema:
43 $ref: "#/definitions/Error"
44 nobodyWithRef:
45 name: bodyWithRefParam
46 in: query
47 type: integer
48 #required: true
49 anotherBodyWithRef:
50 name: anotherBodyWithRefParam
51 in: body
52 schema:
53 $ref: "#/definitions/Error"
54 funnyParam:
55 name: funnyParam
56 in: body
57 schema:
58 $ref: "#/responses/500ErrorResponse/schema"
59
60responses:
61 401ErrorResponse:
62 description: An unexpected 401 error occurred.
63 schema:
64 $ref: "#/definitions/Error"
65 404ErrorResponse:
66 description: An unexpected 404 error occurred.
67 schema:
68 $ref: "#/definitions/Error"
69 500ErrorResponse:
70 description: An unexpected server error occurred.
71 schema:
72 $ref: "#/definitions/Error"
73 funnyResponse:
74 description: An unexpected server error occurred.
75 schema:
76 $ref: "#/responses/401ErrorResponse/schema"
77 foulResponse:
78 description: An unexpected server error occurred.
79 schema:
80 $ref: "#/responses/noSchemaResponse"
81 noSchemaResponse:
82 description: An unexpected server error occurred.
View as plain text