api-manager icon indicating copy to clipboard operation
api-manager copied to clipboard

A way to edit an existing comment on the API using /apis/{apiId}/comments

Open selakap opened this issue 5 years ago • 11 comments

Describe your problem(s)

Expect a way to edit an existing comment on the API. In the current implementation, we cannot do such an update using the POST restful API [1].

  1. https://apim.docs.wso2.com/en/3.1.0/develop/product-apis/devportal-apis/devportal-v1/devportal-v1/#/Comments/addCommentToAPI

Describe your solution

Introduce a PUT resource to /apis/{apiId}/comments

selakap avatar Oct 02 '20 02:10 selakap

We cannot edit comments from the publisher and devPortal because we have not implemented that in the front end. However, back-end support is there for both portals(See [1] and [2]).

[1] https://github.com/wso2/carbon-apimgt/blob/v9.28.36/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/resources/publisher-api.yaml#L2028 [2] https://github.com/wso2/carbon-apimgt/blob/v9.28.36/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml#L1189

thisaltennakoon avatar Jan 14 '23 18:01 thisaltennakoon

@selakap @thisaltennakoon Hi! I want to work on this issue. Could you please assign me?

ModithaM avatar Sep 23 '25 03:09 ModithaM

@ModithaM you can work on this. I have assigned it to you

chamilaadhi avatar Sep 25 '25 09:09 chamilaadhi

I've been assigned to this issue and wanted to clarify the scope before proceeding. After reviewing the current implementation, I found Backend already supports comment editing via PATCH endpoints in both portals:

Publisher: Link to PATCH endpoint DevPortal: Link to PATCH endpoint

Should this issue be updated to focus on frontend implementation rather than adding a new PUT endpoint? Would adding a PUT endpoint create redundancy since PATCH already handles comment updates appropriately? @chamilaadhi

ModithaM avatar Sep 29 '25 16:09 ModithaM

Hi @ModithaM,

As mentioned in the comment [1], we have to support only the frontend implementation for this because the backend patch requests, you have pointed out in your comment are already available.

[1] https://github.com/wso2/api-manager/issues/3463#issuecomment-2544963612

Thanks, Tharika.

tharikaGitHub avatar Oct 01 '25 07:10 tharikaGitHub

Hi @ModithaM how is the progress of this issue?

tharikaGitHub avatar Oct 09 '25 06:10 tharikaGitHub

Hi @ModithaM how is the progress of this issue?

Hi, @tharikaGitHub I’m currently working on this issue and will open a PR over the weekend.

ModithaM avatar Oct 09 '25 08:10 ModithaM

Hi @ModithaM, were you able to open a PR for this issue? If yes, could you please mention the PR here so that the team can take a look?

pavinduLakshan avatar Oct 20 '25 04:10 pavinduLakshan

Hi @ModithaM Do you have an update on the progress of this issue?

tharikaGitHub avatar Oct 28 '25 12:10 tharikaGitHub

@pavinduLakshan @tharikaGitHub I’m still working on it — I haven’t been able to open the PR yet due to some pending fixes. Unfortunately, I won’t be able to complete it before October ends, but I still plan to finish it and contribute regardless. Thanks for understanding!

ModithaM avatar Oct 28 '25 16:10 ModithaM

Thank you for informing us @ModithaM. And Thank you for planing on contributing to our code base regardless!

tharikaGitHub avatar Oct 29 '25 15:10 tharikaGitHub