You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/06/04 12:52:33 UTC

[GitHub] [pulsar] wolfstudy commented on a change in pull request #4368: [Improve DOC] Update functions rest api doc

wolfstudy commented on a change in pull request #4368: [Improve DOC] Update functions rest api doc
URL: https://github.com/apache/pulsar/pull/4368#discussion_r290279601
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/FunctionsBase.java
 ##########
 @@ -73,13 +71,93 @@ public WorkerService get() {
     })
     @Path("/{tenant}/{namespace}/{functionName}")
     @Consumes(MediaType.MULTIPART_FORM_DATA)
-    public void registerFunction(final @PathParam("tenant") String tenant,
-                                 final @PathParam("namespace") String namespace,
-                                 final @PathParam("functionName") String functionName,
-                                 final @FormDataParam("data") InputStream uploadedInputStream,
-                                 final @FormDataParam("data") FormDataContentDisposition fileDetail,
-                                 final @FormDataParam("url") String functionPkgUrl,
-                                 final @FormDataParam("functionConfig") String functionConfigJson) {
+    public void registerFunction(
+            @ApiParam(value = "The function's tenant")
+            final @PathParam("tenant") String tenant,
+            @ApiParam(value = "The function's namespace")
+            final @PathParam("namespace") String namespace,
+            @ApiParam(value = "The function's name")
+            final @PathParam("functionName") String functionName,
+            final @FormDataParam("data") InputStream uploadedInputStream,
+            final @FormDataParam("data") FormDataContentDisposition fileDetail,
+            final @FormDataParam("url") String functionPkgUrl,
 
 Review comment:
   sure, but when I added the corresponding comment for these fields, I found that it only shows the first comment added. The new version of swagger fixes this problem. In the case that we don't update the swagger version, I picked the main `functionsConfig` field comments.
   
   Or about this, if you have a better solution, please let me know.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services