-
Notifications
You must be signed in to change notification settings - Fork 20
Fix default values are removed on serialization #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix default values are removed on serialization #156
Conversation
import { CorrelationDefs } from './types'; | ||
|
||
export class Eventdef { | ||
sourceModel?: Eventdef; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main change is this. I have created new property sourceModel
to store the original value and removed it in the normalize method https://github.com/serverlessworkflow/sdk-typescript/pull/156/files#diff-d777c6a12a20ec15dd1884f631d697c0a39b4ac3d6ed1344786a33d6628325d5R82 before serialization
Having the source stored we can infer if the property has been set by the user or by us in the constructor. https://github.com/serverlessworkflow/sdk-typescript/pull/156/files#diff-85a746dfd50b2ed38f2af0732b08ec5e2c76325048e9d6ae857a12120cda0361R708
Signed-off-by: Antonio Mendoza Pérez <[email protected]>
Signed-off-by: Antonio Mendoza Pérez <[email protected]>
21a6752
to
ac97077
Compare
commit 17fad27 Merge: 6d4dfb5 0cf8067 Author: Tihomir Surdilovic <[email protected]> Date: Tue Feb 1 20:52:32 2022 -0500 Merge pull request #164 from antmendoza/fix-diagram-generation fix diagram generation serverlessworkflow/specification#587 commit 0cf8067 Author: Antonio Mendoza Pérez <[email protected]> Date: Tue Feb 1 22:54:21 2022 +0100 fix diagram generation serverlessworkflow/specification#587 Signed-off-by: Antonio Mendoza Pérez <[email protected]> commit 6d4dfb5 Author: Antonio Mendoza Pérez <[email protected]> Date: Tue Jan 11 08:18:08 2022 +0100 Fix workflow validator (#163) fix WorkflowValidator commit 2636805 Author: Antonio Mendoza Pérez <[email protected]> Date: Mon Jan 10 21:46:11 2022 +0100 ignore js files in test phase (#162) commit b335771 Author: Antonio Mendoza Pérez <[email protected]> Date: Mon Jan 10 21:39:13 2022 +0100 Handle compensatedBy in diagram generation (#161) handle compensatedBy diagram generation commit a89acd0 Author: Antonio Mendoza Pérez <[email protected]> Date: Tue Dec 28 14:41:38 2021 +0100 Code formatting (#160) * order-properties-on-serialization Signed-off-by: Antonio Mendoza Pérez <[email protected]> * code-formating Signed-off-by: Antonio Mendoza Pérez <[email protected]> commit 219768d Author: Antonio Mendoza Pérez <[email protected]> Date: Tue Dec 28 09:16:38 2021 +0100 order-properties-on-serialization (#159) commit 96763b9 Author: Antonio Mendoza Pérez <[email protected]> Date: Sat Dec 25 20:16:46 2021 +0100 Fix default values are removed on serialization (#156) * fix-remove-default-values Signed-off-by: Antonio Mendoza Pérez <[email protected]> * removed-ifObject Signed-off-by: Antonio Mendoza Pérez <[email protected]> commit d6fd5d8 Author: Antonio Mendoza Pérez <[email protected]> Date: Sat Dec 25 16:04:44 2021 +0100 update-package-version-4.0.0 (#157) * update-package-version-4.0.0 Signed-off-by: Antonio Mendoza Pérez <[email protected]> * update-package-version-4.0.0 Signed-off-by: Antonio Mendoza Pérez <[email protected]> commit 955dab0 Merge: 255c834 5424a3d Author: Antonio Mendoza Pérez <[email protected]> Date: Thu Dec 9 01:24:04 2021 +0100 Merge pull request #154 from serverlessworkflow/3.0.x changed-package-version
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it:
closes #129
Special notes for reviewers:
Additional information (if needed):