Skip to content

Commit

Permalink
fix deploy pizzashackapi display issue after publish
Browse files Browse the repository at this point in the history
  • Loading branch information
shnrndk committed Feb 7, 2024
1 parent c4e957a commit 9d96651
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ public final class RestApiConstants {
public static final String ORG_ID = "ORG_ID";

public static final int PAGINATION_LIMIT_DEFAULT = 25;
public static final String PIZZASHACK_SEARCH_QUERY = "name:PizzaShackAPI version:1.0 context:pizzashack";
public static final int PAGINATION_OFFSET_DEFAULT = 0;
public static final String PAGINATION_NEXT_OFFSET = "next_offset";
public static final String PAGINATION_NEXT_LIMIT = "next_limit";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public class SearchApiServiceImpl implements SearchApiService {
public Response search(Integer limit, Integer offset, String query, String ifNoneMatch,
MessageContext messageContext) throws APIManagementException {
SearchResultListDTO resultListDTO = new SearchResultListDTO();
if (query.startsWith("name:") || query.startsWith("description:")) {
if (!query.equals(RestApiConstants.PIZZASHACK_SEARCH_QUERY) && (query.startsWith("name:") |
query.startsWith("description:"))) {
query = query.replaceAll(" ", "%20");

Check warning on line 55 in components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/impl/SearchApiServiceImpl.java

View check run for this annotation

Codecov / codecov/patch

components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/impl/SearchApiServiceImpl.java#L55

Added line #L55 was not covered by tests
}

Expand Down

0 comments on commit 9d96651

Please sign in to comment.