Repository navigation
SOLR-16396: Migrate GET /config/requestHandler to JAX-RS #5168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
a05946a
1efb602
5baa8ab
6c10a14
b02cf83
4e159cd
05d0a9b
a7618b8
e6b2f07
061c966
13dd067
1291fff
3372ab7
ba2c8a9
e84d371
6fede4c
d444b97
c045334
bc37b68
5b16859
1270dbf
6f5d540
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| title: > | ||
| Migrate GET /config/requestHandler to JAX-RS; V2 path and response key | ||
| are now plural requestHandlers (V1 unchanged) | ||
| type: changed | ||
| authors: | ||
| - name: Jalaz Kumar | ||
| nick: jaykay12 | ||
| links: | ||
| - name: SOLR-16396 | ||
| url: https://issues.apache.org/jira/browse/SOLR-16396 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,6 +70,27 @@ ConfigZnodeVersionResponse getZnodeVersion( | |
| @Parameter(description = "Expected request-params znode version") | ||
| int expectedParamsVersion); | ||
|
|
||
| // TODO: RH names contain '/' (e.g. /select, /update/json), so they cannot be a @PathParam in | ||
| // the current design; Keeping filtering via @QueryParam for now. | ||
| @GET | ||
| @Path("/requestHandlers") | ||
| @StoreApiParameters | ||
| @Operation( | ||
| summary = "Fetch request handlers (including implicit handler)", | ||
| tags = {"config"}) | ||
| ConfigInfoResponse getRequestHandler( | ||
| @QueryParam("componentName") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think this is now a path param as well....
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stated the reasoning here in my self-review: #5168 (comment)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can’t put the handler name in the path the way we do for searchComponents/{name} / queryResponseWriters/{name}. Request-handler names are paths themselves (/select, /update/json/docs, /admin/ping, …). A @PathParam would be a single segment, so names with / break routing (and encoding gets ugly). So for request handlers we keep filtering via query param: |
||
| @Parameter(description = "Name of the specific request handler") | ||
| String component, | ||
|
Comment on lines
+82
to
+84
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| @QueryParam("expandParams") | ||
| @DefaultValue("false") | ||
| @Parameter(description = "Expand request handler useParams and effective parameters") | ||
| boolean expandParams, | ||
| @QueryParam("meta") | ||
| @DefaultValue("false") | ||
| @Parameter(description = "Include package metadata (_packageinfo_)") | ||
| boolean meta); | ||
|
|
||
| // TODO: Keep this regex in sync with GetConfig.MIGRATED_CONFIG_COMPONENTS ("searchComponents" | ||
| // and "queryResponseWriters" here are the external, pluralized names for the internal | ||
| // "searchComponent"/"queryResponseWriter" sections; see GetConfig#toExternalComponentName) | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does
@StoreApiParametersmean?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i got introduced to this annotation when doing TaskAPI JAX-RS migrations, this annotations automatically wires the cores/collection & indexName stuffs in the v2 APIs endpoints.
Got this understanding confirmed via Cursor as well now.
