Fix hardcoded API type in DevPortal publishing and ensure correct type during API creation
@DakshithaS is already working on this.
Since Nov 13, 2025.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Problem
The prepareAPIMetadata function in platform-api/src/internal/service/devportal_service.go currently hardcodes the API type to "REST" when building metadata for DevPortal publishing. This causes APIs of other types (GraphQL, WebSocket, etc.) to be published with the wrong type, which may lead to incorrect behavior in the DevPortal.
Scope
This issue should address two related concerns:
-
Fix the hardcoded API type in publishing: The
prepareAPIMetadatafunction should use the actual API type from the API object and only fall back to "REST" when the type is empty or not specified. -
Ensure correct API type during creation: Verify that the API type is correctly set and validated during API creation to prevent incorrect types from being stored in the first place.
References
- PR: https://github.com/wso2/api-platform/pull/149
- Comment: https://github.com/wso2/api-platform/pull/149#discussion_r2521845156
- Requested by: @DakshithaS
Related Files
platform-api/src/internal/service/devportal_service.go(prepareAPIMetadata function)- API creation logic (to be verified)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.