[ 
https://issues.apache.org/jira/browse/NIFI-14144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17915901#comment-17915901
 ] 

ASF subversion and git services commented on NIFI-14144:
--------------------------------------------------------

Commit d9057c7d33065cef036f1712c9bc4b568c0f99af in nifi's branch 
refs/heads/main from Lucas
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=d9057c7d33 ]

NIFI-14144 Fixed status code and content for success in OpenAPI spec (#9629)

Signed-off-by: David Handermann <[email protected]>

> Result types in OpenAPI spec are not declared for success but default instead 
> ------------------------------------------------------------------------------
>
>                 Key: NIFI-14144
>                 URL: https://issues.apache.org/jira/browse/NIFI-14144
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: endzeit
>            Assignee: endzeit
>            Priority: Major
>          Time Spent: 5h 37m
>  Remaining Estimate: 0h
>
> The `swagger.json` / `swagger.yaml` generated during the build process does 
> not declare the result type for a successful request but the default instead 
> for some endpoints.
> Take the following excerpt:
> {code}
>     "/flowfile-queues/{id}/drop-requests" : {
>       "post" : {
>         ...
>         "responses" : {
>           "202" : {
>             "description" : "The request has been accepted. A HTTP response 
> header will contain the URI where the response can be polled."
>           },
>           "400" : {
>             "description" : "NiFi was unable to complete the request because 
> it was invalid. The request should not be retried without modification."
>           },
>           "401" : {
>             "description" : "Client could not be authenticated."
>           },
>           "403" : {
>             "description" : "Client is not authorized to make this request."
>           },
>           "404" : {
>             "description" : "The specified resource could not be found."
>           },
>           "409" : {
>             "description" : "The request was valid but NiFi was not in the 
> appropriate state to process it."
>           },
>           "default" : {
>             "content" : {
>               "application/json" : {
>                 "schema" : {
>                   "$ref" : "#/components/schemas/DropRequestEntity"
>                 }
>               }
>             }
>           }
>         },
>         ...
>       }
>     },
> {code}
> Instead it should be something akin to
> {code}
>     "/flowfile-queues/{id}/drop-requests" : {
>       "post" : {
>         ...
>         "responses" : {
>           "202" : {
>             "description" : "The request has been accepted. A HTTP response 
> header will contain the URI where the response can be polled.",
>             "content" : {
>               "application/json" : {
>                 "schema" : {
>                   "$ref" : "#/components/schemas/DropRequestEntity"
>                 }
>               }
>           },
>           "400" : {
>             "description" : "NiFi was unable to complete the request because 
> it was invalid. The request should not be retried without modification."
>           },
>           "401" : {
>             "description" : "Client could not be authenticated."
>           },
>           "403" : {
>             "description" : "Client is not authorized to make this request."
>           },
>           "404" : {
>             "description" : "The specified resource could not be found."
>           },
>           "409" : {
>             "description" : "The request was valid but NiFi was not in the 
> appropriate state to process it."
>           }
>         },
>         ...
>       }
>     },
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to