API version has been deprecated #46
Replies: 1 comment
|
Yes, the challenge reference is stale now. The curriculum points at REST Countries v3.1, but the provider's current documentation says v1 through v4 are deprecated and the stable API is v5: https://restcountries.com/docs/countries/api-versions The migration is not just a path replacement. The current base URL is: The v5 API uses an Authorization header and returns a JSON:API-style envelope rather than the old bare array. For a front-end challenge, do not commit a real API key in browser code. Use a small server-side proxy/serverless function, or use a checked-in snapshot during development if the assignment is meant to stay static. A minimal request shape is: The exact field names also changed to nested names such as names.common and codes.alpha_2, so the quiz should normalize the response before generating questions. The current list and response-shape options are documented here: https://restcountries.com/docs/countries I would update the challenge text to say that v3.1 is deprecated, show the v5 endpoint and auth requirement, and explicitly warn learners not to expose a production key in a public React bundle. |
Uh oh!
There was an error while loading. Please reload this page.
Hello, I found a small error in "Country Quiz" challenge at "Front-end Libraries Roadmap" curriculum. API that is specified in the assignment is already has been deprecated.
Although, understanding the problem and finding a solution yourself is also a good experience :)
All reactions