Commit d716538
authored
Fix query param serialization for requests with enums (#140)
## Changes
Query parameters are determined reflectively from request classes by
scanning for fields with a QueryParam annotation. Serialization of query
parameters is recursive in order to support complex types like the
filter structures used for listing in the SQL query history service.
This PR makes the following changes:
1. Terminate recursion when the request field is an enum.
2. When iterating through the request object's fields, skip any fields
not annotated with QueryParam (but recursively, all fields do need to be
serialized).
3. Rename the inner class from HeaderEntry to QueryParamPair (it
represents query param pairs, not header entries).
## Tests
Test for this change is dependent on other testing refactors that will
be merged as part of
#139.1 parent 2dc895b commit d716538
File tree
2 files changed
+18
-18
lines changed- databricks-sdk-java/src/main/java/com/databricks/sdk/core
2 files changed
+18
-18
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
Lines changed: 17 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 50 | + | |
| 51 | + | |
58 | 52 | | |
59 | | - | |
| 53 | + | |
60 | 54 | | |
61 | 55 | | |
62 | 56 | | |
63 | 57 | | |
64 | 58 | | |
65 | | - | |
| 59 | + | |
66 | 60 | | |
67 | 61 | | |
68 | | - | |
| 62 | + | |
69 | 63 | | |
70 | 64 | | |
71 | 65 | | |
| |||
103 | 97 | | |
104 | 98 | | |
105 | 99 | | |
106 | | - | |
| 100 | + | |
107 | 101 | | |
108 | 102 | | |
109 | 103 | | |
110 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
111 | 108 | | |
112 | 109 | | |
113 | 110 | | |
114 | 111 | | |
115 | 112 | | |
116 | 113 | | |
117 | 114 | | |
118 | | - | |
119 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
0 commit comments