[
https://issues.apache.org/jira/browse/NIFI-12503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17824657#comment-17824657
]
endzeit edited comment on NIFI-12503 at 3/8/24 9:10 AM:
--------------------------------------------------------
The latest commit version of 2.x seems to not he affected.
This issue seems to only exist on the 1.x branch.
It affects other endpoint that use multipart/form-data as well, e.g.
{code}/process-groups/{id}/templates/upload Uploads a template{code}
Here only one of the two form-data parameters is displayed correctly, the other
one is displayed without name and said to be expected in the body, instead of
as part of the form-data; similar to the endpoint mentioned in the issue itself.
This issue can be seen in the generated {{swagger.json}} under
{{nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/target/swagger-ui}}
already, thus is not an issue of the rendered documentation itself.
{{code}}"/process-groups/{id}/templates/upload" : {
"post" : {
"tags" : [ "process-groups" ],
"summary" : "Uploads a template",
"description" : "",
"operationId" : "uploadTemplate",
"consumes" : [ "multipart/form-data" ],
"produces" : [ "application/xml" ],
"parameters" : [ {
"name" : "id",
"in" : "path",
"description" : "The process group id.",
"required" : true,
"type" : "string"
}, {
"in" : "body",
"name" : "body",
"description" : "Acknowledges that this node is disconnected to allow
for mutable requests to proceed.",
"required" : false,
"schema" : {
"type" : "boolean"
}
}, {
"name" : "template",
"in" : "formData",
"description" : "The binary content of the template file being
uploaded.",
"required" : true,
"type" : "file"
} ],
"responses" : ...
{{code}}
The declaration side of the endpoints in
{{nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java}}
looks fine and has not changed for a long time.
was (Author: endzeitbegins):
The latest commit version of 2.x seems to not he affected.
This issue seems to only exist on the 1.x branch.
It affects other endpoint that use multipart/form-data as well, e.g.
{code}/process-groups/{id}/templates/upload Uploads a template{code}
Here only one of the two form-data parameters is displayed correctly, the other
one is displayed without name and said to be expected in the body, instead of
as part of the form-data; similar to the endpoint mentioned in the issue itself.
This issue can be seen in the generated {{swagger.json}} under
{{nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/target/swagger-ui}}
already, thus is not an issue of the rendered documentation itself.
{{code}}
"/process-groups/{id}/templates/upload" : {
"post" : {
"tags" : [ "process-groups" ],
"summary" : "Uploads a template",
"description" : "",
"operationId" : "uploadTemplate",
"consumes" : [ "multipart/form-data" ],
"produces" : [ "application/xml" ],
"parameters" : [ {
"name" : "id",
"in" : "path",
"description" : "The process group id.",
"required" : true,
"type" : "string"
}, {
"in" : "body",
"name" : "body",
"description" : "Acknowledges that this node is disconnected to allow
for mutable requests to proceed.",
"required" : false,
"schema" : {
"type" : "boolean"
}
}, {
"name" : "template",
"in" : "formData",
"description" : "The binary content of the template file being
uploaded.",
"required" : true,
"type" : "file"
} ],
"responses" : ...
{{code}}
The declaration side of the endpoints in
{{nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java}}
looks fine and has not changed for a long time.
> Missing Documentation for nifi-api
> ----------------------------------
>
> Key: NIFI-12503
> URL: https://issues.apache.org/jira/browse/NIFI-12503
> Project: Apache NiFi
> Issue Type: Improvement
> Affects Versions: 1.25.0
> Reporter: Steven Matison
> Assignee: endzeit
> Priority: Minor
> Attachments: SAMSAL_0-1701894321710.png
>
>
> Community user has noticed that nifi-api docs are missing required request
> values. One such example is groupName on the api call for uploading
> process-groups:
> /process-groups/upload
>
>
> More dialouge and original conversation here:
> [https://community.cloudera.com/t5/Support-Questions/NIFI-API-REST-Upload-Json-definition-flow-file/m-p/380384#M244057]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)