105 lines
2.1 KiB
YAML
105 lines
2.1 KiB
YAML
swagger: '2.0'
|
|
info:
|
|
title: Responses
|
|
version: 0.1.0
|
|
|
|
definitions:
|
|
Error:
|
|
type: object
|
|
description: |
|
|
Contains all the properties any error response from the API will contain.
|
|
Some properties are optional so might be empty most of the time
|
|
required:
|
|
- code
|
|
- message
|
|
properties:
|
|
code:
|
|
description: the error code, this is not necessarily the http status code
|
|
type: integer
|
|
format: int32
|
|
message:
|
|
description: a human readable version of the error
|
|
type: string
|
|
helpUrl:
|
|
description: an optional url for getting more help about this error
|
|
type: string
|
|
format: uri
|
|
|
|
myArray:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/myItems'
|
|
|
|
myItems:
|
|
type: object
|
|
properties:
|
|
propItems1:
|
|
type: integer
|
|
propItems2:
|
|
$ref: 'remote/remote.yaml#/aRemotePlace'
|
|
|
|
otherPlace:
|
|
Error:
|
|
type: object
|
|
properties:
|
|
message:
|
|
type: string
|
|
|
|
parameters:
|
|
BadRequest:
|
|
name: badRequest
|
|
in: body
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
GoodRequest:
|
|
name: goodRequest
|
|
in: body
|
|
schema:
|
|
$ref: '#/otherPlace/Error'
|
|
PlainRequest:
|
|
name: plainRequest
|
|
in: body
|
|
schema:
|
|
type: integer
|
|
StrangeRequest:
|
|
name: stangeRequest
|
|
in: body
|
|
schema:
|
|
$ref: 'responses.yaml#/otherPlace/Error'
|
|
RemoteRequest:
|
|
name: remoteRequest
|
|
in: body
|
|
schema:
|
|
$ref: './remote/remote.yaml#/moreRemoteThanYouCanThink'
|
|
|
|
responses:
|
|
BadRequest:
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/Error'
|
|
GoodRequest:
|
|
description: good request
|
|
schema:
|
|
$ref: '#/otherPlace/Error'
|
|
PlainRequest:
|
|
description: plain request
|
|
schema:
|
|
type: integer
|
|
StrangeRequest:
|
|
description: strange request
|
|
schema:
|
|
$ref: 'responses.yaml#/otherPlace/Error'
|
|
RemoteRequest:
|
|
description: remote request
|
|
schema:
|
|
$ref: './remote/remote.yaml#/moreRemoteThanYouCanThink'
|
|
|
|
paths:
|
|
/:
|
|
get:
|
|
summary: GET
|
|
operationId: getAll
|
|
responses:
|
|
200:
|
|
description: Ok
|