product-apim icon indicating copy to clipboard operation
product-apim copied to clipboard

HTTP PATCH method not working when no request body defined in the resource.

Open Prabhashi opened this issue 2 years ago • 1 comments

Description:

HTTP PATCH method is not working when no request body defined in a patch resource.

Steps to reproduce:

  • Have a Patch resource as below in the API swagger definition.
/testpath/{param}:
    patch:
      tags:
        - testpath
      summary: summary.
      description: Test description.
      parameters:
        - name: param
          in: path
          description: Test param desc.
          required: true
          type: string
      responses:
        '200':
          description: successful operation
        '401':
          $ref: '#/responses/UnauthorizedError'
      x-auth-type: Application & Application User
      x-throttling-tier: Unlimited

So the above does not have request body.

  • Created an API with this swagger file.
  • When trying to invoke patch resource , it is not working because the resource path parameters does not append to the backend URL.

This scenario is working fine with APIM 4.0.

Affected Product Version:

APIM 2.6.0.79

Environment details (with versions):

  • OS:
  • Client:
  • Env (Docker/K8s):

Optional Fields

Related Issues:

Suggested Labels:

Suggested Assignees:

Prabhashi avatar Mar 24 '22 12:03 Prabhashi

Duplicate of https://github.com/wso2/product-apim/issues/7462

ashera96 avatar Mar 29 '22 05:03 ashera96