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/03 03:35:00 UTC

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

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

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/FunctionsBase.java
 ##########
 @@ -73,13 +71,104 @@ 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" +
+                            "autoAck  \n" +
+                            "  Whether or not the framework will automatically acknowledge messages  \n" +
+                            "runtime  \n" +
+                            "  What is the runtime of the function. Possible Values: [JAVA, PYTHON, GO]  \n" +
+                            "resources  \n" +
+                            "  The size of the system resources allowed by the function runtime, include: cpu, ram, disk.  \n" +
+                            "className  \n" +
+                            "  The function's class name  \n" +
+                            "tenant  \n" +
+                            "  The function's tenant  \n" +
+                            "namespace  \n" +
+                            "  The function's namespace  \n" +
+                            "name  \n" +
+                            "  The function's name  \n" +
+                            "customSchemaInputs  \n" +
+                            "  The map of input topics to Schema class names (as a JSON string)  \n" +
+                            "customSerdeInputs  \n" +
+                            "  The map of input topics to SerDe class names (as a JSON string)  \n" +
+                            "deadLetterTopic  \n" +
+                            "  The topic where all messages which could not be processed successfully are sent  \n" +
+                            "runtimeFlags  \n" +
+                            "  Any flags that you want to pass to the runtime. note that in thread mode, these flags will have no impact  \n" +
 
 Review comment:
   ```suggestion
                               "  Any flags that you want to pass to the runtime. Note that in thread mode, these flags will have no impact  \n" +
   ```

----------------------------------------------------------------
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