-
Notifications
You must be signed in to change notification settings - Fork 2
/
CalculatorAPI-OpenApi31.yaml
71 lines (71 loc) · 1.74 KB
/
CalculatorAPI-OpenApi31.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
openapi: 3.1.0
info:
title: APIMATIC Calculator
description: Simple calculator API hosted on APIMATIC
contact: {}
version: '1.0'
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
servers:
- url: https://examples.apimatic.io/apps/calculator
description: This environment connect to the LIVE calculator API
variables: {}
paths:
/{operation}:
get:
tags:
- Simple Calculator
summary: Calculate
description: Calculates the expression using the specified operation.
operationId: Calculate
parameters:
- name: operation
in: path
description: The operator to apply on the variables
required: true
style: simple
schema:
$ref: '#/components/schemas/OperationType'
- name: x
in: query
description: The LHS value
required: true
style: form
explode: true
schema:
type: number
contentEncoding: double
- name: y
in: query
description: The RHS value
required: true
style: form
explode: true
schema:
type: number
contentEncoding: double
responses:
'200':
description: ''
headers: {}
content:
text/plain:
schema:
type: number
contentEncoding: double
contentMediaType: text/plain
deprecated: false
parameters: []
components:
schemas:
OperationType:
title: OperationType
enum:
- SUM
- SUBTRACT
- MULTIPLY
- DIVIDE
type: string
description: Possible operators are sum, subtract, multiply, divide
tags:
- name: Simple Calculator
description: ''