wso2 / api-manager

All issues, tasks, improvements and new features of WSO2 API Manager
Apache License 2.0
34 stars 8 forks source link

Devportal API search returns null for the API 'description' and the 'transportType' parameters #2854

Closed LayaniMal closed 6 months ago

LayaniMal commented 6 months ago

Description

Based on the search criteria, the output of the same API is different.

Hence when using the default content-based search, it always returns the value 'null' for the 'transportType' and 'description' fields. At the same time, if we use the api-category based search, it returns the correct values.

API category search

https://localhost:9443/devportal/apis?offset=0&query=api-category%3Apizza

{
    "count": 2,
    "list": [
        {
            "id": "805832fa-add1-419e-9f1c-dfda5cdbb723",
            "name": "PizzaShackAPI",
            "type": "API",
            "transportType": "HTTP",
            "description": "This is a simple API for Pizza Shack online pizza delivery store.",
            "context": "/pizzashack",
            "version": "1.0.0",
            "provider": "admin",
            "status": "PUBLISHED",
            "thumbnailUri": null,
            "businessInformation": {
                "businessOwner": "Jane Roe",
                "businessOwnerEmail": null,
                "technicalOwner": null,
                "technicalOwnerEmail": null
            },
            "avgRating": "4.5"
        },
        {
            "id": "b298151e-ca5b-40e4-81a4-c1edb97c7f19",
            "name": "testAPI",
            "type": "API",
            "transportType": "HTTP",
            "description": "test description",
            "context": "/abc",
            "version": "1.0",
            "provider": "admin",
            "status": "PUBLISHED",
            "thumbnailUri": null,
            "businessInformation": {
                "businessOwner": null,
                "businessOwnerEmail": null,
                "technicalOwner": null,
                "technicalOwnerEmail": null
            },
            "avgRating": "3.0"
        }
    ],
    "pagination": {
        "offset": 0,
        "limit": 10,
        "total": 2,
        "next": "",
        "previous": ""
    }
}

API content search

https://localhost:9443/devportal/apis/search?query=content%3Apizza

{
    "count": 2,
    "list": [
        {
            "id": "805832fa-add1-419e-9f1c-dfda5cdbb723",
            "name": "PizzaShackAPI",
            "type": "API",
            "transportType": null,
            "description": null,
            "context": "/pizzashack",
            "version": "1.0.0",
            "provider": "admin",
            "status": "PUBLISHED",
            "thumbnailUri": null,
            "businessInformation": {
                "businessOwner": "Jane Roe",
                "businessOwnerEmail": null,
                "technicalOwner": null,
                "technicalOwnerEmail": null
            },
            "avgRating": "0.0"
        },
        {
            "id": "b298151e-ca5b-40e4-81a4-c1edb97c7f19",
            "name": "testAPI",
            "type": "API",
            "transportType": null,
            "description": null,
            "context": "/abc",
            "version": "1.0",
            "provider": "admin",
            "status": "PUBLISHED",
            "thumbnailUri": null,
            "businessInformation": {
                "businessOwner": null,
                "businessOwnerEmail": null,
                "technicalOwner": null,
                "technicalOwnerEmail": null
            },
            "avgRating": "0.0"
        }
    ],
    "pagination": {
        "offset": 0,
        "limit": 10,
        "total": 2,
        "next": "",
        "previous": ""
    }
}

Steps to Reproduce

API category search

https://localhost:9443/devportal/apis?offset=0&query=api-category%3Apizza

API content search

https://localhost:9443/devportal/apis/search?query=content%3Apizza

Affected Component

APIM

Version

4.2.0

Environment Details (with versions)

No response

Relevant Log Output

No response

Related Issues

No response

Suggested Labels

APIM-4.2.0

Lakith-Rambukkanage commented 6 months ago

Fixed by : https://github.com/wso2/carbon-apimgt/pull/12434