go-netbox
go-netbox copied to clipboard
Autogenerate client from swagger json
Focussed on these goals:
- Generate client from
swagger.json - Simplify structure of package (breaking change)
modelsandclientdirectories
Todos:
- [x] Have up-to-date
swagger.json- [x] Take swagger file from blank netbox installation (2.7.10)
- [ ] ~Patch swagger spec for incorrect definitions / missing parts~
- [ ] Higher-level abstraction code to handle polymorphism
@mraerino Still working for this? Sorry for late but, I am planning to add netbox v2.7 for client.
@mraerino Are you still working for this? I would like to add v2.7 supported version.
@kobayashi @mraerino What is the progress on the 2.7 update? Can we also have the versioning tags match, or closely match the netbox versions?
I did the following to update this PR:
- rebase against master
- replace
swagger.jsonwith vanilla file from https://netboxdemo.com/api/docs/?format=openapi - regenerate operations and models using go-swagger
- fix license, examples etc
I did not make any changes to the swagger.json which is the main goal here.
If anyone is interested in moving this forward, please try out this branch using this:
go get -u github.com/netbox-community/go-netbox@86b0ffb1e31c476e90023d048a43ae43a794e3b1
if you are using types from the models, you'd want to replace github.com/netbox-community/go-netbox/netbox/models with github.com/netbox-community/go-netbox/models
I cherry-picked some of the ideas to master. Are we going to keep this open or close for good?
Closing, since there is no activity and these changes were added in #143.