Skip to content

Commit 78314f5

Browse files
committedJul 2, 2023
Added 2 files
1 parent cd27262 commit 78314f5

File tree

2 files changed

+138
-0
lines changed

2 files changed

+138
-0
lines changed
 

‎.spectral.mjs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import ruleset from "https://stoplight.io/api/v1/projects/cHJqOjIwODg1Nw/spectral.js?branch_slug=main&token=97724053-c4ed-498e-a279-b4bb2b229554";
2+
export default { extends: ruleset };

‎reference/Scissor.yaml

+136
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
openapi: 3.1.0
2+
x-stoplight:
3+
id: 0yt6n2s2mjd4z
4+
info:
5+
title: Scissor
6+
version: '1.0'
7+
summary: A simple url shortener
8+
description: A Fast and Simple Url Shortener
9+
contact:
10+
name: Adeyinka Oresanya
11+
email: adeyinkaoresanya@gmail.com
12+
servers:
13+
- url: 'https://scissor-v4pd.onrender.com/'
14+
paths:
15+
/by-user:
16+
get:
17+
summary: Your GET endpoint
18+
tags: []
19+
responses:
20+
'200':
21+
description: OK
22+
'201':
23+
description: Created
24+
operationId: get-by-user
25+
description: gets all URLs created by a logged in user
26+
parameters:
27+
- schema:
28+
type: string
29+
in: cookie
30+
requestBody:
31+
content:
32+
application/json:
33+
schema:
34+
type: object
35+
properties: {}
36+
/login:
37+
post:
38+
summary: ''
39+
operationId: post-login
40+
responses:
41+
'200':
42+
description: OK
43+
description: logs in a registered user
44+
/register:
45+
post:
46+
summary: ''
47+
operationId: post-register
48+
responses:
49+
'200':
50+
description: OK
51+
description: endpoint for registering a first time user
52+
'/ScanQRCode/:id':
53+
get:
54+
summary: Your GET endpoint
55+
tags: []
56+
responses: {}
57+
operationId: 'get-ScanQRCode-:id'
58+
description: gets the generated QR COde of a shortened url
59+
/create:
60+
post:
61+
summary: ''
62+
operationId: post-create
63+
responses:
64+
'200':
65+
description: OK
66+
description: endpoint for creating short URLs from long URLs
67+
'/by-user/:id':
68+
get:
69+
summary: Your GET endpoint
70+
tags: []
71+
responses: {}
72+
operationId: 'get-by-user-:id'
73+
description: gets a particular shortened URL
74+
components:
75+
schemas:
76+
User:
77+
title: User
78+
type: object
79+
description: ''
80+
examples:
81+
- id: 142
82+
firstName: Alice
83+
lastName: Smith
84+
email: alice.smith@gmail.com
85+
dateOfBirth: '1997-10-31'
86+
emailVerified: true
87+
signUpDate: '2019-08-24'
88+
properties:
89+
id:
90+
type: integer
91+
description: Unique identifier for the given user.
92+
x-stoplight:
93+
id: ize9bdbbq3kmr
94+
firstName:
95+
type: string
96+
x-stoplight:
97+
id: yb7w8rt2gtqjr
98+
lastName:
99+
type: string
100+
x-stoplight:
101+
id: kwt16nkcqu207
102+
email:
103+
type: string
104+
format: email
105+
x-stoplight:
106+
id: j1871jq8uj2ka
107+
dateOfBirth:
108+
type: string
109+
format: date
110+
example: '1997-10-31'
111+
x-stoplight:
112+
id: 9fyj5g3mxhz87
113+
emailVerified:
114+
type: boolean
115+
description: Set to true if the user's email has been verified.
116+
x-stoplight:
117+
id: 6al35xa35l5wn
118+
createDate:
119+
type: string
120+
format: date
121+
description: The date that the user was created.
122+
x-stoplight:
123+
id: qp8xw097q0zih
124+
required:
125+
- id
126+
- firstName
127+
- lastName
128+
- email
129+
- emailVerified
130+
x-stoplight:
131+
id: gt89szc10rw9x
132+
securitySchemes:
133+
API Key - 1:
134+
name: API Key
135+
type: apiKey
136+
in: query

0 commit comments

Comments
 (0)
Please sign in to comment.