A way to edit an existing comment on the API using /apis/{apiId}/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].
- 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
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
@selakap @thisaltennakoon Hi! I want to work on this issue. Could you please assign me?
@ModithaM you can work on this. I have assigned it to you
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
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.
Hi @ModithaM how is the progress of this issue?
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.
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?
Hi @ModithaM Do you have an update on the progress of this issue?
@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!
Thank you for informing us @ModithaM. And Thank you for planing on contributing to our code base regardless!