Skip to content

Commit

Permalink
fix hashing issue on service store mapping (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
MauricioUyaguari authored May 23, 2022
1 parent 5d8c7c3 commit 81b132a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/giant-eels-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@finos/legend-extension-external-store-service": patch
---

Fix hashing of service mapping with param definitions ([#1175](https://github.com/finos/legend-studio/issues/1175)).
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class ServiceMapping implements Hashable {
this.pathOffset
? hashObjectWithoutSourceInformation(this.pathOffset)
: '',
this.requestBuildInfo?.toString() ?? '',
this.requestBuildInfo ?? '',
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export class ServiceRequestBuildInfo implements Hashable {
get hashCode(): string {
return hashArray([
SERVICE_STORE_HASH_STRUCTURE.SERVICE_REQUEST_BUILD_INFO,
this.requestBodyBuildInfo?.toString() ?? '',
this.requestParametersBuildInfo?.toString() ?? '',
this.requestBodyBuildInfo ?? '',
this.requestParametersBuildInfo ?? '',
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class ServiceRequestParameterBuildInfo implements Hashable {
get hashCode(): string {
return hashArray([
SERVICE_STORE_HASH_STRUCTURE.SERVICE_REQUEST_PARAMETER_BUILD_INFO,
this.serviceParameter,
this.serviceParameter.name,
this.transform,
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class V1_ServiceMapping implements Hashable {
this.pathOffset
? hashObjectWithoutSourceInformation(this.pathOffset)
: '',
this.requestBuildInfo?.toString() ?? '',
this.requestBuildInfo ?? '',
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export class V1_ServiceRequestBuildInfo implements Hashable {
get hashCode(): string {
return hashArray([
SERVICE_STORE_HASH_STRUCTURE.SERVICE_REQUEST_BUILD_INFO,
this.requestBodyBuildInfo?.toString() ?? '',
this.requestParametersBuildInfo?.toString() ?? '',
this.requestBodyBuildInfo ?? '',
this.requestParametersBuildInfo ?? '',
]);
}
}

0 comments on commit 81b132a

Please sign in to comment.