This repository was archived by the owner on Jun 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathdpg-customization.json
More file actions
181 lines (181 loc) · 4.67 KB
/
Copy pathdpg-customization.json
File metadata and controls
181 lines (181 loc) · 4.67 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "DPGClient",
"description": "DPG Swagger that tests our ability to grow up."
},
"host": "localhost:3000",
"schemes": ["http"],
"produces": ["application/json"],
"paths": {
"/customization/model/{mode}": {
"get": {
"operationId": "getModel",
"description": "Get models that you will either return to end users as a raw body, or with a model added during grow up.",
"parameters": [
{
"$ref": "#/parameters/mode"
}
],
"x-ms-examples": {
"dpg_getModel": {
"$ref": "./examples/getModel.json"
}
},
"responses": {
"200": {
"description": "Returns {'received': <mode>}",
"schema": {
"$ref": "#/definitions/Product"
}
}
}
},
"post": {
"operationId": "postModel",
"description": "Post either raw response as a model and pass in 'raw' for mode, or grow up your operation to take a model instead, and put in 'model' as mode. ",
"parameters": [
{
"$ref": "#/parameters/mode"
},
{
"name": "input",
"in": "body",
"description": "Please put {'hello': 'world!'}",
"schema": {
"$ref": "#/definitions/Input"
},
"required": true
}
],
"x-ms-examples": {
"dpg_postModel": {
"$ref": "./examples/postModel.json"
}
},
"responses": {
"200": {
"description": "Returns {'received': <mode>}",
"schema": {
"$ref": "#/definitions/Product"
}
}
}
}
},
"/customization/paging/{mode}": {
"get": {
"x-ms-pageable": {
"nextLinkName": "nextLink",
"itemName": "values"
},
"operationId": "getPages",
"description": "Get pages that you will either return to users in pages of raw bodies, or pages of models following growup.",
"parameters": [
{
"$ref": "#/parameters/mode"
}
],
"x-ms-examples": {
"dpg_nextLink": {
"$ref": "./examples/nextLink.json"
}
},
"responses": {
"200": {
"description": "Returns two pages of {'received': <mode>}",
"schema": {
"$ref": "#/definitions/ProductResult"
}
}
}
}
},
"/customization/lro/{mode}": {
"put": {
"x-ms-long-running-operation": true,
"operationId": "lro",
"description": "Long running put request that will either return to end users a final payload of a raw body, or a final payload of a model after the SDK has grown up.",
"parameters": [
{
"$ref": "#/parameters/mode"
}
],
"x-ms-examples": {
"dpg_lro": {
"$ref": "./examples/lro.json"
}
},
"responses": {
"200": {
"description": "Initial response with ProvisioningState='Succeeded'",
"schema": {
"$ref": "#/definitions/LROProduct"
}
}
}
}
}
},
"parameters": {
"mode": {
"name": "mode",
"description": "The mode with which you'll be handling your returned body. 'raw' for just dealing with the raw body, and 'model' if you are going to convert the raw body to a customized body before returning to users.",
"required": true,
"type": "string",
"in": "path",
"x-ms-skip-url-encoding": true,
"x-ms-parameter-location": "method"
}
},
"definitions": {
"ProductResult": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"$ref": "#/definitions/Product"
}
},
"nextLink": {
"type": "string"
}
}
},
"Product": {
"type": "object",
"required": ["received"],
"properties": {
"received": {
"type": "string",
"enum": ["raw", "model"]
}
}
},
"Input": {
"type": "object",
"required": ["hello"],
"properties": {
"hello": {
"type": "string"
}
}
},
"LROProduct": {
"type": "object",
"required": ["provisioningState"],
"allOf": [
{
"$ref": "#/definitions/Product"
}
],
"properties": {
"provisioningState": {
"type": "string"
}
}
}
}
}