Commit 5e74f79
authored
Support response content-type with versioned media type (#65500)
This commit allows returning a correct requested response content-type - it did not work for versioned media types.
It is done by adding new vendor specific instances to XContent and TextFormat enums. These instances can then "format" the response content type string when provided with parameters. This is similar to what SQL plugin does with its media types.
#518161 parent f24665f commit 5e74f79
File tree
61 files changed
+446
-122
lines changed- client/rest-high-level/src
- main/java/org/elasticsearch/client
- test/java/org/elasticsearch/client
- docs/reference/search
- libs/x-content/src
- main/java/org/elasticsearch/common/xcontent
- test/java/org/elasticsearch/common/xcontent
- modules
- lang-mustache/src/main/java/org/elasticsearch/script/mustache
- lang-painless/src/test/java/org/elasticsearch/painless/action
- percolator/src/main/java/org/elasticsearch/percolator
- qa/smoke-test-http/src/test/java/org/elasticsearch/http
- server/src
- main/java/org/elasticsearch
- action
- admin/cluster/storedscripts
- index
- ingest
- termvectors
- common
- io/stream
- xcontent
- index/query
- ingest
- rest
- test/java/org/elasticsearch
- common/xcontent
- support/filtering
- ingest
- rest
- action
- admin/indices
- cat
- document
- script
- search
- searchafter
- test/framework/src/main/java/org/elasticsearch/test
- x-pack/plugin
- core/src/main/java/org/elasticsearch
- protocol/xpack/watcher
- xpack/core
- enrich
- ml/action
- monitoring/action
- watcher
- support/xcontent
- transport/actions/execute
- enrich/src/main/java/org/elasticsearch/xpack/enrich/action
- logstash/src/main/java/org/elasticsearch/xpack/logstash/action
- monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter
- rest-compatibility
- src/javaRestTest/java/org/elasticsearch/compat
- sql/qa/server/src/main/java/org/elasticsearch/xpack/sql/qa
- watcher/src
- internalClusterTest/java/org/elasticsearch/xpack/watcher/transport/action/activate
- main/java/org/elasticsearch/xpack/watcher
- common
- http
- text
- notification
- pagerduty
- slack
- test/java/org/elasticsearch/xpack/watcher/input/http
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
61 files changed
+446
-122
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1177 | 1177 | | |
1178 | 1178 | | |
1179 | 1179 | | |
1180 | | - | |
| 1180 | + | |
1181 | 1181 | | |
1182 | 1182 | | |
1183 | 1183 | | |
1184 | 1184 | | |
1185 | 1185 | | |
1186 | 1186 | | |
1187 | | - | |
| 1187 | + | |
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1821 | 1821 | | |
1822 | 1822 | | |
1823 | 1823 | | |
1824 | | - | |
| 1824 | + | |
1825 | 1825 | | |
1826 | | - | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
1827 | 1829 | | |
1828 | 1830 | | |
1829 | 1831 | | |
| |||
1840 | 1842 | | |
1841 | 1843 | | |
1842 | 1844 | | |
1843 | | - | |
| 1845 | + | |
1844 | 1846 | | |
1845 | 1847 | | |
1846 | 1848 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
108 | 115 | | |
109 | 116 | | |
110 | 117 | | |
| |||
151 | 158 | | |
152 | 159 | | |
153 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
154 | 173 | | |
Lines changed: 23 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
| |||
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
68 | | - | |
| 66 | + | |
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
75 | | - | |
| 73 | + | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
80 | | - | |
81 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
170 | 173 | | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
174 | 177 | | |
175 | | - | |
| 178 | + | |
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| |||
181 | 184 | | |
182 | 185 | | |
183 | 186 | | |
184 | | - | |
185 | | - | |
| 187 | + | |
| 188 | + | |
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
| |||
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
194 | | - | |
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
| 200 | + | |
198 | 201 | | |
199 | | - | |
| 202 | + | |
| 203 | + | |
200 | 204 | | |
| 205 | + | |
| 206 | + | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
204 | 216 | | |
205 | 217 | | |
206 | 218 | | |
| |||
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
| 101 | + | |
101 | 102 | | |
102 | | - | |
| 103 | + | |
103 | 104 | | |
104 | | - | |
| 105 | + | |
105 | 106 | | |
106 | | - | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
117 | 120 | | |
118 | | - | |
| 121 | + | |
119 | 122 | | |
120 | | - | |
| 123 | + | |
121 | 124 | | |
122 | | - | |
| 125 | + | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
| |||
0 commit comments