wso2 / wso2/api-platform

Fix hardcoded API type in DevPortal publishing and ensure correct type during API creation

Open
#153 0 comments 0 reactions 1 assignee View on GitHub

@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:

  1. Fix the hardcoded API type in publishing: The prepareAPIMetadata function should use the actual API type from the API object and only fall back to "REST" when the type is empty or not specified.

  2. 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

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.