deblockt / hal-rest-client

Typescript HAL Rest client
Apache License 2.0
25 stars 11 forks source link

fixing the issue that linked types are always a HalResource #25

Open Smolli opened 6 years ago

Smolli commented 6 years ago

I was at the point were I was wondering why an embedded HAL resource isn't of the type that it was declared. I debugged and found that little bug. If the HAL name and the TS name don't match, the wrong type is being used. This should fix it.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 98.932% when pulling 16aa36a0dd3f4e4375268d324bcf7d569c975c3f on Smolli:master into c5b637e8b30f247276eff860a9eee0ad5e3b1d31 on deblockt:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.3%) to 98.587% when pulling 65594fbb866a8a8931e96cbb1be848810748972d on Smolli:master into c5b637e8b30f247276eff860a9eee0ad5e3b1d31 on deblockt:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-1.0%) to 97.945% when pulling ec82cf5f6cd1934e481ff2512ede09accad209af on Smolli:master into c5b637e8b30f247276eff860a9eee0ad5e3b1d31 on deblockt:master.

Smolli commented 6 years ago

I added some handling to be able to serialize embedded arrays correctly. And I added lodash if you don't mind. 😃 I will provide the test coverage this weekend.

Smolli commented 6 years ago

Could this be a part of the solution for https://github.com/deblockt/hal-rest-client/issues/22?

deblockt commented 6 years ago

Thanks for this PR. after add unit test, and some code fix. it can be merged

deblockt commented 6 years ago

@Smolli did you have work on your unit test?

Smolli commented 6 years ago

Sorry, not right now. They shifted the focus on another project at work. But I try to get my hands on as soon as possible.