-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
70 lines (69 loc) · 1.62 KB
/
swagger.yaml
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
swagger: '2.0'
info:
version: 1.0.0
title: Test Swagger yamlfile
description: A big test for Ansible
host: swagger.tld
basePath: /myswaggerapi
consumes:
- application/json
produces:
- application/json
paths:
/pets:
get:
description: Returns all pets from the petstore
responses:
'200':
description: pet response
schema:
type: array
items:
$ref: '#/definitions/pet'
default:
description: unexpected error
schema:
$ref: '#/definitions/errorModel'
post:
description: Creates a new pet in the store
parameters:
- name: pet
in: body
description: Pet to add to the store
required: true
schema:
$ref: '#/definitions/pet'
responses:
'200':
description: pet response
schema:
$ref: '#/definitions/pet'
default:
description: unexpected error
schema:
$ref: '#/definitions/errorModel'
'/pets/{name}':
get:
description: Returns a single pet by name
parameters:
- name: name
in: path
description: Name of the pet to fetch
required: true
type: string
responses:
'200':
description: pet response
schema:
$ref: '#/definitions/pet'
default:
description: unexpected error
schema:
$ref: '#/definitions/errorModel'
definitions:
pet:
$ref: pet.yaml
pet-owner:
$ref: pet-owner.yaml
errorModel:
$ref: error.json