-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yml
76 lines (66 loc) · 2.17 KB
/
openapi.yml
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
openapi: 3.0.3
info:
title: TDD Demo Software Crafters Lyon 2021
description: |
See [JMLamodiere/tdd-demo-swcraftlyon-scala](https://github.com/JMLamodiere/tdd-demo-swcraftlyon-scala/blob/main/README.md) on GitHub.
To call [SwaggerHub API Auto Mocking](https://app.swaggerhub.com/help/integrations/api-auto-mocking) urls,
choose `virtserver.swaggerhub.com` in `Servers` list
version: 1.0.0
# See https://swagger.io/docs/specification/paths-and-operations/
paths:
/runningsessions:
post:
summary: Register a running session
tags: [ Running Session ]
requestBody:
required: true
description: Temperature is enriched by a weather provider
content:
application/json:
schema:
$ref: '#/components/schemas/PostRunningSession'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/RunningSession'
# See https://swagger.io/docs/specification/components/
components:
# See https://swagger.io/docs/specification/data-models/
# NB : they appear in the generated doc
schemas:
PostRunningSession:
type: object
required: [ distance, shoes ]
properties:
distance:
type: number
format: float
example: 5.5
shoes:
type: string
example: 'Adadis Turbo2'
RunningSession:
allOf:
# Inherit PutRunningSession
- $ref: '#/components/schemas/PostRunningSession'
- type: object
required: [ id, celsiusTemperature ]
properties:
id:
type: integer
minimum: 1
example: 42
celsiusTemperature:
type: number
format: float
example: 37.2
# See https://swagger.io/docs/specification/api-host-and-base-path/
servers:
- url: 'http://localhost:8000'
description: dev
# See https://app.swaggerhub.com/help/integrations/api-auto-mocking
- description: SwaggerHub API Auto Mocking
url: https://virtserver.swaggerhub.com/JMLamodiere/tdd-demo-swcraftlyon-2021/1.0.0