We want to explore how to record responses for all endpoints of GitHub’s REST API.
Here is how I would approach this. My work-in-progress lives at gr2m/github-rest-api-responses
The endpoint responses would differ from the current scenarios as they would all be a single request/response.
Improvements
- Record response with all preview headers enabled for the endpoint.
- Normalize responses like we do in @octokit/fixtures
- Bonus: Once responses are normalized, we could add the responses to @octokit/fixtures for testing
- Reuse setups to record requests. E.g. when recording "create an issue", that setup can be used for "get an issue" and many others.
We want to explore how to record responses for all endpoints of GitHub’s REST API.
Here is how I would approach this. My work-in-progress lives at gr2m/github-rest-api-responses
@octokit/routesto generate a list of requests that would need to be sent. Use preview headers where they are required(There are 508 requests for api.github.com as of March 18)
Then after the "Add labels to issues" request was recorded, delete the temporary repository again.
We might be able to use the route path as an indication of the "hierarchy of requests", meaning what setup is needed to record a certain request.
@ocotkit/routesso the two can be combined easily.The endpoint responses would differ from the current scenarios as they would all be a single request/response.
Improvements