-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopenapi.yml
More file actions
63 lines (63 loc) · 1.38 KB
/
openapi.yml
File metadata and controls
63 lines (63 loc) · 1.38 KB
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
openapi: 3.0.0
components:
schemas:
HaversineRequest:
type: object
properties:
start:
type: object
properties:
long:
type: number
lat:
type: number
end:
type: object
properties:
long:
type: number
lat:
type: number
required:
- start
- end
HaversineResonse:
type: object
properties:
distance:
type: number
required:
- distance
ErrorResponse:
type: object
properties:
error:
type: string
securitySchemes: {}
info:
title: CO2 Api
description: CO2 calculations API
version: '1'
servers: []
paths:
/haversine:
post:
operationId: haversine
summary: 'Calculate distance between 2 GPS points with haversine '
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/HaversineRequest'
description: Two pairs of GPS coordinates
parameters: []
responses:
'201':
description: Status 201 Response
content: {}
'500':
description: Status 500 Response
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'