-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing assignees field in SearchIssuesAndPullRequestsResponseData["items"][0] #148
Comments
We currently derive the types from the examples in the documentation, in this case it's https://docs.github.com/en/rest/reference/search#search-issues-and-pull-requests However, we do have JSON schemas now that would be a much better source to generate the types from, we just didn't get to it yet. I hope to find time to work on this soon |
Is there anything short term that can be done, such as fixing the documentation? |
The documentation team is working on that right now I think, they are aware of the discrepancies between the documented example payloads and the JSON API schema that was recently published at https://github.com/github/rest-api-description/. They all work very hard right now and I'd rather not distract them. It's unfortunately not an easy fix to just change the payload example in this one case. I expect to start working on the better TypeScript types on my side next week, so stay tuned. For now I'd be best if you work around it on your side |
Thank you so much for all these info :) I will work around it for now like you suggested. |
I'm still working on #161, but I confirmed that this problem will be resolved. The types are defined here: https://github.com/octokit/openapi-types.ts/blob/36baf50bddd8b3baecd6601ea3301e82e6b225d7/generated/types.ts#L26433 |
🎉 This issue has been resolved in version 6.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What happened?
Incorrect type for
SearchIssuesAndPullRequestsResponseData
(associated withRestEndpointMethodTypes["search"]["issuesAndPullRequests"]["response"]["data"]["items"]
)What did you expect to happen?
Given the following minimal reproduction:
The response includes "assignees" field while the type (see below) does not.
Present buggy generated type (dist-types/generated/Endpoint.d.ts, @nodes/types@5.2.0):
The text was updated successfully, but these errors were encountered: