Skip to content

Commit

Permalink
fix(sdk): fixed the status value always empty in the inventory list (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
xuelianhan007 authored Nov 12, 2024
1 parent 31391c0 commit c35a541
Show file tree
Hide file tree
Showing 24 changed files with 49 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
targetType: string
targetLocation: BODY
requiredMapping: true
checkPath: "$[0].id"
checkPath: "$[0]['id']"
deletePath: "$[*]"
- name: mapper.inventory.eline.list.startDate
title: "The date from which the product starts"
Expand All @@ -61,7 +61,7 @@ spec:
title: "Possible values for the status of a MEF product"
source: "@{{responseBody.status}}"
sourceLocation: BODY
target: "@{{[*].status}}"
target: "@{{status}}"
targetType: enum
targetLocation: BODY
requiredMapping: true
Expand All @@ -74,7 +74,7 @@ spec:
- suspended
- suspendedPendingTerminate
- terminated
valueMappings:
valueMapping:
ACTIVE: active,
CANCELLED: canceled,
PENDING: pendingActive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
targetType: string
targetLocation: BODY
requiredMapping: true
checkPath: "$[0].id"
checkPath: "$[0]['id']"
deletePath: "$[*]"
- name: mapper.inventory.uni.list.startDate
title: "The date from which the product starts"
Expand All @@ -60,7 +60,7 @@ spec:
title: "Possible values for the status of a MEF product"
source: "@{{responseBody.port.status}}"
sourceLocation: BODY
target: "@{{[*].status}}"
target: "@{{status}}"
targetType: enum
targetLocation: BODY
requiredMapping: true
Expand All @@ -73,9 +73,10 @@ spec:
- suspended
- suspendedPendingTerminate
- terminated
valueMappings:
valueMapping:
ACTIVE: active,
ACTIVATING: pendingActive
DELETING: pendingTerminate
DISABLED: suspended
DELETED: terminated
CANCELED: cancelled
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
path: /mefApi/sonata/productOrderingManagement/v10/productOrder/{id}
method: get
productType: access_e_line
actionType: delete
endpoints:
- path: /api/v2/company/{username}/connections/{connectionId}
method: GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
path: /mefApi/sonata/productOrderingManagement/v10/productOrder/{id}
method: get
productType: uni
actionType: delete
endpoints:
- id: retrieve connection detail by id
path: /api/company/{companyName}/ports/orders/{orderId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spec:
- name: mapper.quote.uni.add.sync.rollInterval.amount
source: "@{{quoteItem[0].requestedQuoteItemTerm.rollInterval.amount}}"
sourceLocation: BODY
target: "12"
target: "1"
targetLocation: BODY
requiredMapping: false
- name: mapper.quote.uni.add.sync.rollInterval.units
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spec:
path: /mefApi/sonata/productOrderingManagement/v10/productOrder/{id}
method: get
productType: access_e_line
actionType: delete
endpoints:
- id: retrieve connection detail by id of eline delete order
path: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spec:
path: /mefApi/sonata/productOrderingManagement/v10/productOrder/{id}
method: get
productType: uni
actionType: delete
endpoints:
- id: retrieve connection detail by id of uni delete order
path: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
- ACCESS_E_LINE
- path: /mefApi/sonata/productOrderingManagement/v10/productOrder/{id}
method: get
actionTypes:
- add
- delete
productTypes:
- UNI
- ACCESS_E_LINE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ public class ApiActivityLog extends AbstractHttpModel {

private String clientId;
private String buyer;
private String buyerId;
private String buyerName;
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public Paging<ApiActivityLog> search(LogSearchRequest logSearchRequest, Pageable
UnifiedAssetDto buyerAssetDto =
buyerIdEntityMap.getOrDefault(apiActivityLog.getBuyer(), null);
if (Objects.nonNull(buyerAssetDto)) {
apiActivityLog.setBuyerId(buyerAssetDto.getId());
BuyerOnboardFacets facets =
UnifiedAsset.getFacets(buyerAssetDto, BuyerOnboardFacets.class);
apiActivityLog.setBuyerName(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ default String transform(
"converted source:{}, converted target:{},", convertedSource, convertedTarget);
compactedResponseBody =
JsonToolkit.generateJson(
convertToJsonPointer(mapper.getTarget().replace(REQUEST_BODY, StringUtils.EMPTY)),
convertToJsonPointer(mapper.getTarget().replace(RESPONSE_BODY, StringUtils.EMPTY)),
convertedSource,
compactedResponseBody);
}
Expand Down Expand Up @@ -130,8 +130,11 @@ default String deleteNodeByPath(Map<String, String> checkPathMap, String json) {
try {
obj = doc.read(key);
} catch (Exception e) {
String err = String.format("Json Path read key error, key:%s", key);
String err =
String.format(
"Json Path read key error, key:%s, value:%s will be deleted", key, value);
LogHolder.log.error(err, e);
doc.delete(value);
return;
}
if (null == obj || (obj instanceof String str && (StringUtils.isBlank(str)))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ spec:
title: "Possible values for the status of a MEF product"
source: ""
sourceLocation: ""
target: "@{{[*].status}}"
target: "@{{status}}"
targetType: enum
targetLocation: BODY
requiredMapping: true
Expand All @@ -74,4 +74,4 @@ spec:
- suspended
- suspendedPendingTerminate
- terminated
valueMappings: {}
valueMapping: {}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
title: "Possible values for the status of a MEF product"
source: ""
sourceLocation: ""
target: "@{{[*].status}}"
target: "@{{status}}"
targetType: enum
targetLocation: BODY
requiredMapping: true
Expand All @@ -73,4 +73,4 @@ spec:
- suspended
- suspendedPendingTerminate
- terminated
valueMappings: {}
valueMapping: {}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
path: /mefApi/sonata/productOrderingManagement/v10/productOrder/{id}
method: get
productType: access_e_line
actionType: delete
endpoints:
- path: ""
method: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
path: /mefApi/sonata/productOrderingManagement/v10/productOrder/{id}
method: get
productType: access_e_line
actionType: add
endpoints:
- path: ""
method: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
path: /mefApi/sonata/productOrderingManagement/v10/productOrder/{id}
method: get
productType: uni
actionType: delete
endpoints:
- id: retrieve connection detail by id
path: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
path: /mefApi/sonata/productOrderingManagement/v10/productOrder/{id}
method: get
productType: uni
actionType: add
endpoints:
- id: retrieve connection detail by id
path: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spec:
path: /mefApi/sonata/productOrderingManagement/v10/productOrder/{id}
method: get
productType: access_e_line
actionType: delete
endpoints:
- id: retrieve connection detail by id of eline delete order
path: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spec:
path: /mefApi/sonata/productOrderingManagement/v10/productOrder/{id}
method: get
productType: uni
actionType: delete
endpoints:
- id: retrieve connection detail by id of uni delete order
path: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
- ACCESS_E_LINE
- path: /mefApi/sonata/productOrderingManagement/v10/productOrder/{id}
method: get
actionTypes:
- add
- delete
productTypes:
- UNI
- ACCESS_E_LINE
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,10 @@ spec:
- classpath:/mef-sonata/api-targets-mappers/api-target-mapper.inventory.eline.read.yaml
- classpath:/mef-sonata/api-targets-mappers/api-target-mapper.inventory.uni.read.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.address.validation.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.order.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.order.uni.add.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.order.uni.delete.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.order.eline.delete.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.order.eline.add.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.quote.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.quote.uni.add.sync.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.quote.uni.add.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.quote.eline.add.sync.yaml
Expand All @@ -100,10 +98,8 @@ spec:
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.inventory.eline.read.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.inventory.uni.list.yaml
- classpath:/mef-sonata/mapping-matrix/mapping.matrix.inventory.eline.list.yaml
- classpath:/mef-sonata/template-upgrade/release.1.5.6.yaml
- classpath:/mef-sonata/template-upgrade/release.1.5.7.yaml
- classpath:/mef-sonata/template-upgrade/release.1.5.8.yaml
- classpath:/mef-sonata/template-upgrade/release.1.5.9.yaml
- classpath:/mef-sonata/template-upgrade/release.1.5.10.yaml


templateUpgradePaths:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
kind: kraken.product.template-upgrade
apiVersion: v1
metadata:
key: kraken.product.template-upgrade.1.5.10
name: V1.5.10
labels:
productSpec: grace
productVersion: V1.5.10
publishDate: 2024-11-13 16:14
description: |
Fixed the status value always empty in the inventory list, and added a built-in process for empty value of id in response from downstream.
version: 2

0 comments on commit c35a541

Please sign in to comment.