forked from digipolisantwerpdocumentation/api-requirements
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.yaml
77 lines (77 loc) · 2.02 KB
/
example.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
70
71
72
73
74
75
76
77
---
swagger: '2.0'
info:
version: 1.0.5
title: Pizza Slicer API
description: With this API you can predict how many slices you need to cut your
pizza for a given crowd.
contact:
name: Awesome startup
url: http://www.awesomestartup.be
email: [email protected]
host: "{{host}}"
basePath: "/{{domain}}/{{apiname}}/{{apiversion}}"
schemes:
- "https"
paths:
"/pizzas":
post:
summary: Add a pizza to the party
description: You can add as many pizza's to the party as you want. Be sure to
waste no food however.
produces:
- application/json
parameters:
- "$ref": "#/parameters/apikeyParam"
- "$ref": "#/parameters/tenantParam"
responses:
'201':
description: Pizza added
pizzas/{pizzaId}:
get:
summary: Get the pizza by Id
description: Retrieve the flavor, size and awesomeness of the pizza that we've
numbered for you.
produces:
- application/json
parameters:
- name: pizzaId
description: The number on the side of the pizzabox
in: path
required: true
type: string
- "$ref": "#/parameters/apikeyParam"
- "$ref": "#/parameters/tenantParam"
responses:
'200':
description: Ok
pizzas/{pizzaId}/slice:
put:
summary: Slices the pizza
description: Ready to dive in? Slice the pizza and distribute the pieces.
produces:
- application/json
parameters:
- name: pizzaId
description: The number on the side of the pizzabox
in: path
required: true
type: string
- "$ref": "#/parameters/apikeyParam"
- "$ref": "#/parameters/tenantParam"
responses:
'200':
description: Ok
parameters:
apikeyParam:
name: apikey
description: from a contract in the api store
in: header
required: true
type: string
tenantParam:
name: tenant
description: the name of the tenant you want to use
in: header
required: true
type: string