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

 ##########
 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,
+            @ApiParam(
+                    value = "A JSON value presenting a functions config 
playload. An example of the expected functions can be found down here.  \n" +
 
 Review comment:
   I think we should document `FunctionConfig` here, not the options from 
`functions` command tool.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to