-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSquare.yml
More file actions
87 lines (87 loc) · 1.95 KB
/
Square.yml
File metadata and controls
87 lines (87 loc) · 1.95 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
swagger: '2.0'
info:
title: Square
version: 1.0.0
description: API to calculate the square of a number (Paack)
contact:
name: Antonio Bernabe Rodriguez
email: abernabe@gmail.com
url: 'https://whatever.com'
host: run-hello-api-j4a6w2xpuq-ew.a.run.app
schemes:
- https
produces:
- application/json
consumes:
- application/json
paths:
/api:
parameters: []
get:
summary: Calculates the square for a given number
tags: []
responses:
'200':
description: Square calculated
schema:
$ref: '#/definitions/ValueSquared'
examples:
example-1:
Value Squared: 0
headers:
dummy-header:
type: string
description: dummy
'400':
$ref: '#/responses/400'
operationId: get-number-square
description: Calculates the square for a given number
parameters:
- type: number
in: query
name: value
description: Number to be squared
required: true
definitions:
ValueSquared:
description: ''
type: object
properties:
Value Squared:
type: number
required:
- Value Squared
x-examples:
example-1:
Value Squared: 9
basePath: /
responses:
'400':
description: Invalid request
content:
application/json:
schema:
properties:
id:
type: string
schema:
description: ''
type: object
properties:
Required parameters:
type: string
minLength: 1
Supplied parameters:
type: string
minLength: 1
required:
- Required parameters
- Supplied parameters
x-examples:
example-1:
Required parameters: value
Supplied parameters: '[''asdasd'']'
examples:
example-1:
Required parameters: string
Supplied parameters: string