gerlowskija commented on code in PR #2734:
URL: https://github.com/apache/solr/pull/2734#discussion_r1805218688


##########
solr/core/src/java/org/apache/solr/handler/admin/api/CoreReplicationAPI.java:
##########
@@ -68,6 +71,45 @@ public FileListResponse fetchFileList(
     return doFetchFileList(gen);
   }
 
+  @GET

Review Comment:
   This is all correct and in line with the v2 APIs you did back in 2023 (PR 
#1620 PR #1704).
   
   But we've made a slight tweak since then to support the [OpenAPI code 
generation stuff](https://issues.apache.org/jira/browse/SOLR-16825).  In short 
- we needed the JAX-RS annotations to live somewhere that gets compiled 
*before* "core", so that "core" can use all the nice generated code.  We 
managed this by creating a new Gradle module - "api" - where the JAX-RS 
annotations live on interfaces.  (Code in "core" can then implement those 
interfaces with methods containing the API logic).
   
   Long story short - we'll want to do the same here.  There's some 
instructions 
[here](https://github.com/apache/solr/blob/main/dev-docs/apis.adoc#writing-jax-rs-apis)
 that might be helpful.  Though in your case most of the steps are already done 
- the pieces just need moved around a bit.
   
   (Slightly my fault for not calling out more explicitly on SOLR-16470 that 
the setup had changed since your earlier commits, so I'm willing to make the 
necessary changes here.  You may beat me to it, but if not I'll try and update 
this eventually.)



##########
solr/core/src/java/org/apache/solr/handler/admin/api/CoreReplicationAPI.java:
##########
@@ -68,6 +71,45 @@ public FileListResponse fetchFileList(
     return doFetchFileList(gen);
   }
 
+  @GET
+  @Path("/files/{filePath}")
+  @Produces({MediaType.TEXT_PLAIN, BINARY_CONTENT_TYPE_V2})
+  public String fetchFile(

Review Comment:
   [?] Can this really return a `String`?  Since it can return raw files I 
would've expected this to have to return `InputStream` or `Object` or something 
more generic in order to handle the potentially-binary content coming back?



-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to