nacx commented on this pull request.


> +   @GET
+   @Fallback(Fallbacks.EmptyListOnNotFoundOr404.class)
+   List<Vpn> getList(GenericQueryOptions options);
+
+   @Named("vpn:get")
+   @GET
+   @Path("/{vpnId}")
+   @Fallback(Fallbacks.NullOnNotFoundOr404.class)
+   Vpn get(@PathParam("vpnId") String vpnId);
+
+   @Named("vpn:configurations:get")
+   @GET
+   @Path("/{vpnId}/configuration_file")
+   @SelectJson("config_zip_file")
+   @Fallback(Fallbacks.NullOnNotFoundOr404.class)
+   String getConfiguration(@PathParam("vpnId") String vpnId);

Well, I know it is unnecessary, but if we already know we are returning a zip 
file, why not returning a proper stream?

I mean, we know it is not *a regular string*, the same way that we return 
objects instead of raw json. Responses are not simple strings and we try to 
return useful objects. Also many users that consume apis look first at the 
method signatures and in the worst case they read the docs :) Returning a 
ZipInputStream here would serve two purposes: better document what this method 
does, and provide a better interface for users.

Adding that should be trivial, as the function should only ned to decode the 
string and create a stream for it, not a big deal we'll struggle to maintain.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/319

Reply via email to