epugh opened a new pull request, #4180:
URL: https://github.com/apache/solr/pull/4180

   Migrates `CancelTaskAPI` from the homegrown `@EndPoint` annotation to 
standard JAX-RS, and replaces the manual `GenericSolrRequest` usage in the 
integration test with the code-generated `TasksApi.CancelTask` SolrJ client.
   
   ## API interface (`solr/api`)
   - New `CancelTaskApi` interface with `@Path`, `@GET`, `@QueryParam` JAX-RS 
annotations using `@StoreApiParameters` for core/collection path support
   - Returns `FlexibleSolrJerseyResponse` (instead of `SolrJerseyResponse`) so 
the dynamic `cancellationResult` field is captured via `@JsonAnySetter` when 
deserializing
   
   ## Server implementation (`solr/core`)
   - `CancelTaskAPI` extends `JerseyResource`, implements `CancelTaskApi`, uses 
`@Inject` for `SolrCore`/`SolrQueryRequest`/`SolrQueryResponse`
   - Delegates to `QueryCancellationHandler.handleRequestBody()` (logic stays 
in V1 handler), then copies non-header entries from `solrQueryResponse` into 
the returned jersey response — required because Jersey's JSON path serializes 
the returned object directly, not `solrQueryResponse`
   - `QueryCancellationHandler` now uses `getJerseyResources()` / empty 
`getApis()` instead of `AnnotatedApi`
   
   ## Test
   Uses the generated `TasksApi.CancelTask` with `SolrJettyTestRule`. The 
generated class handles V2 URL routing (`/api/…` vs `/solr/…`) automatically 
via `getApiVersion() == V2`, eliminating the need to construct a separate V2 
`HttpSolrClient`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to