Commit c750aae
authored
[Fix] Correctly include query parameters for APIs whose request objects contain the body as a field (#401)
## What changes are proposed in this pull request?
The Databricks API spec has two different styles of APIs, those where
the request body is a field in the `Request` structure, and those where
the request body is said structure (not counting the parameters passed
via the URI path and query string). The former style of APIs was
incorrectly implemented, preventing such APIs from using any query
parameters.
Generally, the approach taken here is to move the construction of the
request object into the autogenerated `Impl` classes and providing a
fully materialized `Request` object to the `ApiClient`. To do so, we
expose the `<T> T execute(Request in, Target Class<T>)` method as
public.
Separately, I've removed the per-HTTP-method methods from `ApiClient`,
opting instead to use the singular `execute`, as they purely create more
maintenance burden for us and decrease the surface area we need to
maintain.
## How is this tested?
Added `AppsImplTest` to verify that the no_compute flag is included in
the request passed to the `ApiClient`.1 parent 6b76d2a commit c750aae
139 files changed
Lines changed: 6730 additions & 2956 deletions
File tree
- databricks-sdk-java/src
- main/java/com/databricks/sdk
- core
- oauth
- service
- apps
- billing
- catalog
- cleanrooms
- compute
- dashboards
- files
- iam
- jobs
- marketplace
- ml
- oauth2
- pipelines
- provisioning
- serving
- settings
- sharing
- sql
- vectorsearch
- workspace
- test/java/com/databricks/sdk
- core
- service
- apps
- jobs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 115 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 164 | + | |
175 | 165 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 166 | + | |
180 | 167 | | |
181 | 168 | | |
182 | | - | |
| 169 | + | |
183 | 170 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 171 | + | |
188 | 172 | | |
189 | 173 | | |
190 | | - | |
191 | | - | |
| 174 | + | |
192 | 175 | | |
193 | | - | |
194 | 176 | | |
195 | 177 | | |
196 | 178 | | |
197 | 179 | | |
198 | 180 | | |
199 | 181 | | |
200 | 182 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | 183 | | |
291 | 184 | | |
292 | 185 | | |
293 | 186 | | |
294 | 187 | | |
295 | 188 | | |
296 | 189 | | |
297 | | - | |
| 190 | + | |
298 | 191 | | |
299 | 192 | | |
300 | 193 | | |
| |||
533 | 426 | | |
534 | 427 | | |
535 | 428 | | |
536 | | - | |
| 429 | + | |
537 | 430 | | |
538 | 431 | | |
539 | 432 | | |
| |||
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
593 | 596 | | |
594 | 597 | | |
595 | 598 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
0 commit comments