-
Notifications
You must be signed in to change notification settings - Fork 58
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
Repos::get_collaborator_permission_level() return model is not correct #89
Comments
I'd assume so, I just started with It may be a good idea to change the issue title to something like It would be great of this project could just watch API changes and release automatically. |
I'm thinking of creating my own Rust GitHub client because this one seems to be unmaintained, https://github.com/XAMPPRocky/octocrab is done manually and not generated, and I'm not aware of any others. We'll see if I can find the time 😄 |
Yeah, it took me 5 minutes to rule out I was thinking the same but before putting any effort into it, it would be great if such a project could be backed up by GitHub itself so the maintenance is not left to a single individual. Perhaps the way to go about it would be to start the conversation over at https://github.com/octokit. Today I tested the generator from this repository with the latest spec but apart from several small changes, the necessary change I needed for create_deployment endpoint was not enough. Because the endpoint has an optional field
but the generated code is: #[serde(
default,
skip_serializing_if = "Vec::is_empty",
deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
)]
pub required_contexts: Vec<String>,
```
So the generated code does not allow `[]`
|
The model returned from
Repos::get_collaborator_permission_level()
looks like (some attributes omitted):Where the response schema from the API documentation for the endpoint looks like:
Expand Me
The top-level field
role_name
is missing, and theuser
field looks more like the structCollaborator
thanSimpleUser
(although evenCollaborator
is not quite right, becauseFullRepositoryPermissions
is missing the fieldstriage
andmaintain
).This may be because the code is generated from GitHub's API spec 1.1.4 (Dec 2021) instead of the latest version 2.1.0 (Oct 2022)?
The text was updated successfully, but these errors were encountered: