yultrish / student_lookUp_api

A Spring Boot application integrated with an external API using Java and Groovy, facilitating retrieval of student details based on school code and student ID, ensuring accurate data mapping and logging for monitoring
0 stars 0 forks source link

Retrieve full response from API Request #1

Open winniequartey opened 1 month ago

winniequartey commented 1 month ago

https://github.com/yultrish/student_lookUp_api/blob/acf713e58ff455025a799fbd86ec00099c79ae74/src/main/java/groovy/exercise/externalApi/service/StudentService.java#L41

The ExternalAPiResponse class doesn't have all the fields returned by the API, hence part of the response is lost. Update your code to retrieve the full API response. You can make use of a generic map for JSON responses so nothing is lost and you wouldn't need to update the code each time you need a new value from the response.