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