Skip to content

Commit

Permalink
Merge pull request wso2#12417 from tharindu1st/jwt-claim-cache
Browse files Browse the repository at this point in the history
support spaces in api name in api import path
  • Loading branch information
tharikaGitHub committed Apr 3, 2024
2 parents 97ef159 + 3865a84 commit aca0f25
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,6 @@ private static JsonObject processRetrievedDefinition(String jsonContent) throws
configObject = preProcessEndpointConfig(configObject);

// Locate the "provider" within the "id" and set it as the current user
String apiName = configObject.get(ImportExportConstants.API_NAME_ELEMENT).getAsString();

// The "version" may not be available for an API Product
if (configObject.has(ImportExportConstants.VERSION_ELEMENT)) {
Expand All @@ -1258,9 +1257,7 @@ private static JsonObject processRetrievedDefinition(String jsonContent) throws
}

// Remove spaces of API/API Product name/version if present
if (apiName != null && apiVersion != null) {
configObject.remove(apiName);
configObject.addProperty(ImportExportConstants.API_NAME_ELEMENT, apiName.replace(" ", ""));
if (apiVersion != null) {
if (configObject.has(ImportExportConstants.VERSION_ELEMENT)) {
configObject.remove(ImportExportConstants.VERSION_ELEMENT);
configObject.addProperty(ImportExportConstants.VERSION_ELEMENT, apiVersion.replace(" ", ""));
Expand Down

0 comments on commit aca0f25

Please sign in to comment.