Open marceloverdijk opened 6 years ago
Yes, you are right, I found that mappings tricky and I know that the response is not complete. I just tried to implement the parts that I know. Maybe is a matter of knowing more about the jackson library.
Yes mapping is tricky and on purpose we have different names of fields in our api and the SW api. That is part of the test case to see if this implemented correctly. This is a common ‘problem’ in our daily user stories that we need to solve.
Can you update the code to make it work as expected?
I can try to make it work but to be honest I would need to study more about it. I do not currently know to do it. I think there is an annotation in Jackson that lets you map the property to a custom implementation in the code. I can try and find a solution based on that if you want me to.
I also added the "HowToUse.md" file just to try and explain all the decisions that i took regarding the project.
http://localhost:8080/api/persons?q=luke returns
but the following is expected as described in https://github.com/Q24/qforce/blob/master/README.md:
To be precise, the following fields contain invalid data:
id
(always0, but should be the id part of the
url` in the SWAPI response)gender
(lowercase but should be uppercase)wight
(alwaysnull
, but should be themass
in the SWAPI response)movies
(alwaysnull
, but should be thefilms
in the SWAPI response)Additionally, the unit/integration tests seem not be testing this which makes the tests incomplete.