-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
77 lines (77 loc) · 1.63 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
swagger: "2.0"
info:
description: "SMOL - Simple Minimiser Of Links: A simple link shortener"
version: "1.0.0"
title: "SMOL"
license:
name: "AGPL 3.0"
url: "https://www.gnu.org/licenses/agpl-3.0.en.html"
host: "s.cub3d.pw"
basePath: "/api"
tags:
- name: "api"
description: "Manage links"
schemes:
- "https"
- "http"
paths:
/shorten:
post:
tags:
- "api"
summary: "Create a short link"
description: ""
operationId: "shortenLink"
consumes:
- "application/json"
produces:
- "*/*"
parameters:
- in: "body"
name: "body"
description: "Link to shorten"
required: true
schema:
$ref: "#/definitions/ShortLinkInput"
responses:
"200":
description: "Successful"
schema:
type: "string"
/link/{shortLink}/info:
get:
tags:
- "api"
summary: "Get link info"
description: ""
operationId: "infoLink"
produces:
- "application/json"
parameters:
- in: "path"
name: "shortLink"
description: "Short code of link"
required: true
type: "string"
responses:
"200":
description: "Successful"
schema:
$ref: "#/definitions/LinkInfo"
definitions:
ShortLinkInput:
type: "object"
properties:
source:
type: "string"
format: "url"
LinkInfo:
type: "object"
properties:
target:
type: "string"
format: "url"
created:
type: "string"
format: "date-time"
description: "Time that link was shortened"