"Even though if we add multiple versions of an API, only one version of that particular API is visibile in the publisher."
Which version is this? I tested in 2.1.0 i can see all versioned apis in publisher, is this happening when you have more than 10 APIs? On Thu, Nov 23, 2017 at 4:41 AM, Megala Uthayakumar <meg...@wso2.com> wrote: > Hi All, > > I am working on adding access control support to APIM 2.1.x,. For this > feature, we are making use of the registry property-search for the getting > relevant resources based on user roles. While doing the implementation, I > came across following behaviour, > > Even though if we add multiple versions of an API, only one version of > that particular API is visibile in the publisher. While analyzing this > issue, I understood this issue is only happening if we are using > PaginationContext init, with the sort property "overview_name" (i.e. API > Name). This has happened because when finally sorting the merged attribute > search result and property search result, we are using the TreeSet in [1] > and in TreeSet if comparator [2] returns 0, it will be thought as duplicate > and that value will be replaced TreeSet. Since in API Manager case, both > the versions of API will have the same "overview_name" and the comparator > will return the value as 0, so only one value will be given as result. In > order to overcome this, we need to return some other value, whenever the > comparison value is 0. > > I have created an github issue for this [3] and did a fix for this issue[ > 4]. I tested this fix locally and it seems to be working fine. > > Appreciate if someone from registry team can review and merge this. > > [1] https://github.com/wso2/carbon-governance/blob/master/ > components/governance/org.wso2.carbon.governance.api/ > src/main/java/org/wso2/carbon/governance/api/util/ > GovernanceUtils.java#L2055 > [2] https://github.com/wso2/carbon-governance/blob/master/ > components/governance/org.wso2.carbon.governance.api/ > src/main/java/org/wso2/carbon/governance/api/util/ > GovernanceUtils.java#L2056 > [3] https://github.com/wso2/carbon-governance/issues/297 > [4] https://github.com/wso2/carbon-governance/pull/298 > > Thanks. > > Regards, > Megala > -- > Megala Uthayakumar > > Software Engineer > Mobile : 0779967122 > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev