-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
119 lines (119 loc) · 3.72 KB
/
openapi.yaml
File metadata and controls
119 lines (119 loc) · 3.72 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
openapi: 3.0.4
info:
title: Tip Calculator
description: Tip Calculator is a tool for calculating tips and splitting bills among multiple people. It provides common tip percentage comparisons and per-person breakdowns.
termsOfService: https://apiverve.com/terms/
contact:
name: APIVerve Support
email: hello@apiverve.com
url: https://apiverve.com/contact
version: 1.0.9
externalDocs:
description: Learn more about APIVerve
url: https://docs.apiverve.com?utm_source=openapi
servers:
- url: https://api.apiverve.com/
paths:
/v1/tipcalculator:
get:
summary: Calculate Tip
description: Tip Calculator is a tool for calculating tips and splitting bills among multiple people. It provides common tip percentage comparisons and per-person breakdowns.
operationId: tipcalculator
parameters:
- name: amount
in: query
schema:
type: string
required: true
description: The bill amount before tip
example: '100'
- name: percentage
default: '15'
in: query
schema:
type: string
required: false
description: 'Tip percentage (0-100, default: 15)'
example: '18'
- name: people
default: '1'
in: query
schema:
type: string
required: false
description: 'Number of people to split the bill (default: 1)'
example: '4'
- name: currency
default: USD
in: query
schema:
type: string
required: false
description: 'Currency code for display (default: USD)'
example: USD
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: status
error:
type: string
description: error
data:
type: string
description: data
example:
status: ok
error:
data:
bill_amount: 100
tip_percentage: 18
tip_amount: 18
total_amount: 118
currency: USD
split_between: 4
per_person:
bill_amount: 25
tip_amount: 4.5
total_amount: 29.5
common_tip_amounts:
- percentage: 10
tip_amount: 10
total: 110
per_person: 27.5
- percentage: 15
tip_amount: 15
total: 115
per_person: 28.75
- percentage: 18
tip_amount: 18
total: 118
per_person: 29.5
- percentage: 20
tip_amount: 20
total: 120
per_person: 30
- percentage: 25
tip_amount: 25
total: 125
per_person: 31.25
'401':
description: Your request was not authorized, or your API Key was invalid
'404':
description: Requested resource was not found
'500':
description: A server error has occured, try again later
components:
securitySchemes:
api_key:
type: apiKey
name: x-api-key
in: header
security:
- api_key: []