Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Update Fault Model #18

Merged
merged 5 commits into from
May 7, 2019
Merged

Update Fault Model #18

merged 5 commits into from
May 7, 2019

Conversation

jkeane64
Copy link
Contributor

@jkeane64 jkeane64 commented Apr 18, 2019

Add arguments property

Description

Adds arguments to the Fault model as this provides valuable information specifically for Reitmans project

No access to arguments object from fault message

Type of change

  • [X ] New feature (non-breaking change which adds functionality)

Changes

Added arguments to Fault Model

How to test this PR?

Checklist:

  • [ X] My code follows the style guidelines of this project (npm run lint)
  • [ X] I have performed a self-review of my own code
  • [ X] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md and CHANGELOG.md) - N/A
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (npm test)

Add arguments property
@jkeane64 jkeane64 requested a review from bendvc April 18, 2019 17:39
@jkeane64 jkeane64 requested a review from kevinxh May 3, 2019 15:01
Copy link
Contributor

@bendvc bendvc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jkeane64

I took a look at your requested change and it looked good. Only one small change to maintain consistency with the rest of our models. If you don't mind making that change, I can work on making a release.

Thanks,
Ben

@@ -62,6 +68,9 @@ export default class Fault {
if (data.hasOwnProperty('type')) {
obj['type'] = ApiClient.convertToType(data['type'], 'String')
}
if (data.hasOwnProperty('arguments')) {
obj['arguments'] = ApiClient.convertToType(data['arguments'], Object)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are going to by consistent in the way our type coercion is done in the rest of the models the correct argument to pass into convertToType should be {String: 'Blob'} or {String: Object}. I would try these to ensure they work, but looking at the code it should work no problem. Doing it this way is a little bit more descriptive on the data's property type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

Copy link
Contributor

@bendvc bendvc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bendvc bendvc merged commit 2418614 into develop May 7, 2019
@bendvc bendvc deleted the update-fault-model branch May 7, 2019 16:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants