Implement API layer for publish API method #112
Merged
amalka.subasinghe
merged 11 commits from pasindu/device-mgt-core:publisherAPILayer
into master
2 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'pasindu/device-mgt-core:publisherAPILayer'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Purpose
The purpose of this PR is to fix https://roadmap.entgra.net/issues/10097
Goals
Implement API layer for publish API method.
Approach
NOTE:
3d7b58d8a5
to7f4900e5c5
2 years ago7f4900e5c5
to9f1fdae4b1
2 years ago9f1fdae4b1
tof7c5513ba4
2 years agoNow the repo has been restructured. please update your PR
f7c5513ba4
toedbcf4eedb
2 years agoedbcf4eedb
to63aab761b0
2 years ago63aab761b0
to9230a85369
2 years ago9230a85369
toe208d46f02
2 years agoe208d46f02
tod4807b6b11
2 years agopackage io.entgra.device.mgt.core.apimgt.extension.rest.api.util.APIUtils;
no licence header, pls check all new classes
// This will retrieve the un deployed revision list
JSONArray undeployedRevisionList = (JSONArray)
publisherRESTAPIServices.getAPIRevisions(apiApplicationKey, accessTokenInfo,
existingAPI.getString("id"), "?query=deployed:false").get("list");
should pass true or false here and making of real api request should be done in the method it self
Fixed with
b133f56965
// api.setKeyManagers(keyManagers);
// api.setEnableStore(true);
// api.setEnableSchemaValidation(false);
// api.setMonetizationEnabled(false);
clean up unwanted code
* This class represents the API response.
*/
public class APIResponseUtil {
this is a dto class right? Why name it as APIResponseUtil? Util we use to put utilities
and dto clases should not be placed under util package.
d4807b6b11
to7246209bd8
2 years agoWIP: Implement API layer for publish API methodto Implement API layer for publish API method 2 years agoaccessTokenInfo = apiApplicationServices.generateAccessTokenFromRegisteredApplication(
apiApplicationKey.getClientId(), apiApplicationKey.getClientSecret());
} catch (APIServicesException e) {
String errorMsg = "Error while generating application";
Change error message, e.g:- Error occurred while generating the API application.
if (apiObj.getString("name").equals(apiIdentifier.getApiName().replace(Constants.SPACE,
Constants.EMPTY_STRING))){
apiFound = true;
apiIdentifier.setUuid(apiObj.getString("id"));
Don't we need to break the loop when the condition satisfied?
JSONArray documentList = (JSONArray) publisherRESTAPIServices.getDocumentations(apiApplicationKey,
accessTokenInfo, api.getId()).get("list");
if (!(documentList.length() == 0)) {
if (!(documentList.length() == 0)) --> if (documentList.length() > 0)
Fixed with
c5a7902386
302f62a264
into master 2 years agoReviewers
302f62a264
.