-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
60 lines (56 loc) · 1.1 KB
/
swagger.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
tags:
- name: Url Shortener
description: The url shortener API
paths:
# [POST] encode
/encode:
post:
tags:
- Shortener
summary: short(encode) a url
parameters:
- name: body
in: body
description: The url which we need to shorten
required: true
schema:
$ref: '#/definitions/Urls'
responses:
200:
description: 'Created'
400:
description: 'Bad Request'
500:
description: 'Server Error'
# [GET] decode
/decode:
get:
tags:
- Shortener
summary: The url which we need to decode
parameters:
- name: encodedUrl
in: query
description: encoded(short) Url
required: true
type: string
responses:
200:
description: 'OK'
400:
description: 'Bad Request'
500:
description: 'Server Error'
# definitions
definitions:
Urls:
type: object
required:
- url
properties:
url:
type: string
description: web address
schemes:
- https
- http