Fix api data mapping
MODIFY
src/app/components/developer/api-list/api-list.component.html
src/app/components/developer/api-list/api-list.component.html
</ng-container>
<ng-container matColumnDef="tryApi">
<th mat-header-cell *matHeaderCellDef>Try API</th>
- <td mat-cell *matCellDef="let element"> <mat-icon class="button" *ngIf="element.swaggerDefinitionType !== null || element.swaggerDefinitionType !== 'None'" (click)="this.openSwaggerView(element)" matTooltip="Try the API">play_arrow</mat-icon> </td>
+ <td mat-cell *matCellDef="let element"> <mat-icon class="button" *ngIf="element.swaggerDefinitionType !== null && element.swaggerDefinitionType !== 'None'" (click)="this.openSwaggerView(element)" matTooltip="Try the API">play_arrow</mat-icon> </td>
</ng-container>
<ng-container matColumnDef="options">
<th mat-header-cell *matHeaderCellDef>Options</th>

MODIFY
src/app/components/developer/api-list/api-list.component.ts
src/app/components/developer/api-list/api-list.component.ts
@@ -74,8 +74,12 @@ export class ApiListComponent implements OnChanges {
this.checkReceivedData(clients, contracts, apiVersions, gateways);
return from(contracts)
.pipe(map(contract => {
- const apiVersion = apiVersions.find(version => version.api.id === contract.apiId);
- const clientVersion = clients.find(version => version.id === contract.clientId);
+ const apiVersion = apiVersions.find(version => version.api.id === contract.apiId
+ && version.version === contract.apiVersion
+ && version.api.organization.id === contract.apiOrganizationId);
+ const clientVersion = clients.find(version => version.id === contract.clientId
+ && version.version === contract.clientVersion
+ && version.organizationId === contract.clientOrganizationId);
const gateway = gateways.find(g => g.id === apiVersion.gateways[0].gatewayId);
return this.buildViewData(contract, gateway, clientVersion, apiVersion);
}));

GW-303: Fix api data mapping