-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathApiEndpoint.json
More file actions
162 lines (162 loc) · 4.16 KB
/
Copy pathApiEndpoint.json
File metadata and controls
162 lines (162 loc) · 4.16 KB
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{
"$ref": "#/definitions/ApiEndpoint",
"definitions": {
"ApiEndpoint": {
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^[a-z_][a-z0-9_]*$",
"description": "Unique endpoint ID"
},
"path": {
"type": "string",
"pattern": "^\\/",
"description": "URL Path (e.g. /api/v1/customers)"
},
"method": {
"type": "string",
"enum": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH"
],
"description": "HTTP Method"
},
"summary": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"flow",
"script",
"object_operation",
"proxy"
],
"description": "Implementation type"
},
"target": {
"type": "string",
"description": "Target Flow ID, Script Name, or Proxy URL"
},
"objectParams": {
"type": "object",
"properties": {
"object": {
"type": "string"
},
"operation": {
"type": "string",
"enum": [
"find",
"get",
"create",
"update",
"delete"
]
}
},
"additionalProperties": false,
"description": "For object_operation type"
},
"inputMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Source field/path"
},
"target": {
"type": "string",
"description": "Target field/path"
},
"transform": {
"type": "string",
"description": "Transformation function name"
}
},
"required": [
"source",
"target"
],
"additionalProperties": false
},
"description": "Map Request Body to Internal Params"
},
"outputMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Source field/path"
},
"target": {
"type": "string",
"description": "Target field/path"
},
"transform": {
"type": "string",
"description": "Transformation function name"
}
},
"required": [
"source",
"target"
],
"additionalProperties": false
},
"description": "Map Internal Result to Response Body"
},
"authRequired": {
"type": "boolean",
"default": true,
"description": "Require authentication"
},
"rateLimit": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"default": false
},
"windowMs": {
"type": "number",
"default": 60000,
"description": "Time window in milliseconds"
},
"maxRequests": {
"type": "number",
"default": 100,
"description": "Max requests per window"
}
},
"additionalProperties": false,
"description": "Rate limiting policy"
},
"cacheTtl": {
"type": "number",
"description": "Response cache TTL in seconds"
}
},
"required": [
"name",
"path",
"method",
"type",
"target"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}