-
Notifications
You must be signed in to change notification settings - Fork 124
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
changelogs, files, and other rpm fields are represented incorrectly in the api spec #3694
Comments
the following patch to the pulp api spec seems to help, but it may not be a full fix:
|
oh and I realized we can use 'fields' to workaround this, so its not high priority for us right now |
If I understand correctly this was not a regression, you are just trying this out for the first time, right?
Yes, I believe so. I think that if we can show this doesnt work with other binding clients it would be safer to update. A second approach is monkey-patching the types in the api-spec, as you've shown.
Can you elaborate? What |
@pedro-psb yes, trying for the first time. I'm not sure it ever worked.
The list packages api: https://pulpproject.org/pulp_rpm/restapi/#tag/Content:-Packages/operation/content_rpm_packages_list provides a fields and exclude_fields option that excludes some fields from being returned in the api. If I use the 'fields' parameter and only include a few fields i care about (name, version, release, arch), it works perfectly fine, since the problematic fields are excluded. |
Discussion in the RPM meeting: it's not necessarily a breaking change for Python and Ruby bindings because of their dynamically typed nature, maybe we can change the schema and fix the Go bindings without breaking usages of Ruby and Python bindings. We can make the change and compare generated bindings code before and after, maybe it is fine? Worst case we can release it alongside a breaking release. |
Version
Describe the bug
When we produce Go bindings for the pulp api spec, and try to fetch rpms from the ContentRpmPackagesList api, we get an error:
Playing around with this with Go, it appears that its related to the fact that changelogs, files etc.. are declared as an 'Object', but in fact are an array of an array of strings
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the api spec to reflect the data returned.
Additional context
This may be related to #3657 ?
these fields in the schema:
example json fetched from the api:
The text was updated successfully, but these errors were encountered: