-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.yaml
118 lines (113 loc) · 3 KB
/
index.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
openapi: 3.0.0
info:
title: Schema Generator API
description: This API allows you to build Typescript interfaces for a MongodDB collection
version: 1.0.0
servers:
- url: http://localhost:8000
description: Local server
paths:
/buildSchema:
post:
summary: Build Schema
description: |
This request can be used to send the database and collection name for which you want to build a Typescript interface.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
dbName:
type: string
example: sample_mflix
collectionName:
type: string
example: movies
fieldName:
type: string
example: type
intervalWindow:
type: integer
example: 25
required:
- dbName
- collectionName
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
id:
type: string
example: dummmy-id
/checkStatus:
get:
summary: Check Status
description: |
Use this request to check the status of your request to keep track whether it completed, or it is in processing, or it failed.
parameters:
- in: query
name: id
schema:
type: string
required: true
description: The ID of the request
example: dummy-id
responses:
'200':
description: Status response
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: completed
/downloadZip:
get:
summary: Download Zip
description: |
Use this request to download a zip file of the Typescript file containing the interface and a schema in JSON format.
parameters:
- in: query
name: id
schema:
type: string
required: true
description: The ID of the request
example: dummy-id
responses:
'200':
description: Zip file response
content:
application/zip:
schema:
type: string
format: binary
components:
schemas:
RequestBody:
type: object
properties:
dbName:
type: string
collectionName:
type: string
fieldName:
type: string
intervalWindow:
type: integer
StatusResponse:
type: object
properties:
status:
type: string
ZipResponse:
type: string
format: binary