wso2 / wso2/api-platform

Replace hardcoded OpenAPI definition placeholder with actual API definition in DevPortal publish flow

Open
#138 1 comment 0 reactions 1 assignee View on GitHub

@DakshithaS is already working on this.

Since Nov 11, 2025.

Dominant language
Go
Stars
71
Forks
111
Avg merge
1d 14h
Merged PRs (30d)
110

Description

Problem

In the DevPortal publishing flow, the code currently uses a hardcoded OpenAPI JSON template with only basic metadata (title, version, description) instead of the actual API definition.

File: platform-api/src/internal/service/devportal_service.go
Lines: 537-545
Method: publishAPIToDevPortalInternal

The current implementation creates a minimal OpenAPI spec placeholder:

apiDefinitionBytes := []byte(fmt.Sprintf(`{
    "openapi": "3.0.0",
    "info": {
        "title": "%s",
        "version": "%s",
        "description": "%s"
    },
    "paths": {}
}`, api.Name, api.Version, api.Description))

This doesn't reflect the actual API specification and should be replaced with the real API definition.

Expected Behavior

The code should retrieve and use the actual OpenAPI definition from the API object or repository.

Related

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.