Closed chdxD1 closed 3 years ago
/cc @awlx :D
@chdxD1 thanks for your PR :). Is it good to merge from your perspective or anything you'd like to add before we merge it?
@awlx is the failing go 1.16.x check something to worry about? I've tried to replicate it locally with a clean 1.16 docker container but there it worked fine. Maybe some feedback on the wording in the README would be appreciated https://github.com/netbox-community/go-netbox/pull/121/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5 :smile:
I don't think it's something to worry about as it fails for everything ... and I didn't figure out yet why this happens. Also it's only 1.16.
https://github.com/netbox-community/go-netbox/releases/tag/netbox_v3.0 released! Thanks again @chdxD1
This is my first PR here but I hope that this is fine!
This PR tries to update this library to Netbox version 3.0.2. There are some changes however from the official swagger.json file that can be fetched from a Netbox:
swagger generate client
generates it in a scientific notation which does not work with go"additionalProperties": {"type": "string", "x-nullable": true}
. This will result in a map ofinterface{}
instead of the correct nested types. Swagger does not really support discriminators on the same level (like connected_endpoint_type / cable_peer_type) apparently. However the connected_endpoint and cable_peer_type can vary. Also some nested types are missing (e.g. for console ports).I think the swagger autogeneration on the netbox side itself also needs some love to not require these changes but it's something someone needs to take care off (https://github.com/netbox-community/netbox/issues/4808, https://github.com/netbox-community/netbox/issues/4804)