Skip to content

Commit 31a8d5e

Browse files
committed
Add OpenAPI documentation
1 parent 1465ee5 commit 31a8d5e

File tree

4 files changed

+4158
-0
lines changed

4 files changed

+4158
-0
lines changed

api/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules

api/openapi.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
openapi: 3.0.1
2+
3+
info:
4+
title: 'Snowflake API'
5+
version: '1'
6+
7+
servers:
8+
- url: /
9+
10+
components:
11+
responses:
12+
NotFound:
13+
description: 'Not found'
14+
content:
15+
'application/json':
16+
schema:
17+
$ref: '#/components/schemas/Error'
18+
example:
19+
message: 'Not found'
20+
21+
BadRequest:
22+
description: 'Bad request'
23+
content:
24+
'application/json':
25+
schema:
26+
$ref: '#/components/schemas/Error'
27+
example:
28+
message: 'Bad request'
29+
30+
schemas:
31+
Error:
32+
type: object
33+
properties:
34+
message:
35+
type: string
36+
37+
User:
38+
type: object
39+
properties:
40+
name:
41+
type: string
42+
maxLength: 255
43+
designation:
44+
type: string
45+
team_name:
46+
type: string
47+
email:
48+
type: string
49+
format: email
50+
profile_pic:
51+
type: string
52+
format: url
53+
username:
54+
type: string
55+
56+
paths:
57+
'/v1/users/_autocomplete':
58+
get:
59+
summary: 'Autocomplete'
60+
responses:
61+
'200':
62+
description: 'OK'
63+
content:
64+
'application/json':
65+
schema:
66+
$ref: '#/components/schemas/User'
67+
'400':
68+
$ref: '#/components/responses/BadRequest'

0 commit comments

Comments
 (0)