Skip to content

Commit

Permalink
Fixing typo issues
Browse files Browse the repository at this point in the history
  • Loading branch information
HiranyaKavishani committed Oct 11, 2023
1 parent 0cd359c commit a39f2bd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1920,6 +1920,15 @@ public API createNewAPIVersion(String existingApiId, String newVersion, Boolean
return getAPIbyUUID(newAPIId, organization);
}

/**
* Create a new API Product version from an existing API Product
* @param existingApiProductId The id of the API Product to be copied
* @param newVersion The version of the new API Product
* @param isDefaultVersion whether this version is default or not
* @param organization Identifier of an organization
* @return APIProduct object
* @throws APIManagementException
*/
public APIProduct createNewAPIProductVersion(String existingApiProductId, String newVersion,
Boolean isDefaultVersion, String organization) throws APIManagementException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private static void changeAPIProductLifecycle(APIProvider apiProvider, APIProduc
throw new APIManagementException("Invalid Lifecycle status provided for default APIExecutor");
}

// If the API status is CREATED/PROTOTYPED ,check for check list items of lifecycle
// If the API Product status is CREATED/PROTOTYPED ,check for check list items of lifecycle
executeLifeCycleChecklist(apiProvider, new ApiTypeWrapper(apiProduct), currentState, targetState, checklist);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,6 @@ public Response createNewAPIProductVersion(String newVersion, String apiProductI
}
APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();
String tenantDomain = RestApiCommonUtil.getLoggedInUserTenantDomain();

APIProduct versionedAPIProduct = apiProvider.createNewAPIProductVersion(apiProductId, newVersion,
defaultVersion, tenantDomain);
newVersionedApiProduct = APIMappingUtil.fromAPIProducttoDTO(versionedAPIProduct);
Expand All @@ -1179,7 +1178,7 @@ public Response createNewAPIProductVersion(String newVersion, String apiProductI
// the existence of the resource
RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_API_PRODUCT, apiProductId, e, log);
} else if (isAuthorizationFailure(e)) {
RestApiUtil.handleAuthorizationFailure("Authorization failure while copying API : "
RestApiUtil.handleAuthorizationFailure("Authorization failure while copying API Product : "
+ apiProductId, e, log);
} else {
String errorMessage = "Error while copying API Product : " + apiProductId;
Expand Down

0 comments on commit a39f2bd

Please sign in to comment.