go-netbox
go-netbox copied to clipboard
Upstream patches of forked go-netbox client
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
I just merged https://github.com/netbox-community/go-netbox/pull/92 so we have master working with netbox 2.9
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
Could you make a PR with the revlevant changes?
Sure, gonna prepare something.
Closing, because now there are two ways to fix issues in generated code:
- Changing the OpenAPI spec with pre-generation hooks (see
scripts/pre-generation
). - If the above is not possible, changing the generated code with post-generation hooks (see
scripts/post-generation
).