netbox-community / go-netbox

The official Go API client for Netbox IPAM and DCIM service.
Other
194 stars 144 forks source link

Upstream patches of forked go-netbox client #93

Closed hensoko closed 1 year ago

hensoko commented 3 years ago

Hey there,

we're using netbox with go for quite some time now but started working on a fork of go-netbox as the swagger.json was often out of date. I'm currently preparing simple patches that can be applied hopefully against new versions of swagger.json to fix several (type of *_id fields / number fields) and wonder how I can help upstream.

You can find my changes in feature/modernize.

Regards

awlx commented 3 years ago

I just merged https://github.com/netbox-community/go-netbox/pull/92 so we have master working with netbox 2.9

hensoko commented 3 years ago

As far as I can see there are still several fields that seem to be generated wrong.

For example: /virtualization/cluster-types or /virtualization/clusters The id field of the list operation is defined as string instead of integers. I have a lot of examples of this kind that I have fixed, eg for virtualization see here

awlx commented 3 years ago

Could you make a PR with the revlevant changes?

hensoko commented 3 years ago

Sure, gonna prepare something.

v0ctor commented 1 year ago

Closing, because now there are two ways to fix issues in generated code: