gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.4k stars 547 forks source link

Suggestion: Auto generate client-sdk from swagger API documentation #1741

Open Exchizz opened 1 year ago

Exchizz commented 1 year ago

Hi, I would like to configure netmaker from ansible. I imagine something like:

netmaker.egress_gateway:
   node_id: <node id>
   interface: eth0
   nat: true|false
   ranges:
      - a.b.c.d/x
      - a.d.e.b/y
   state: present

In order to create the ansible module(s), i need a python library that wraps the netmaker API. Instead of implementing this by hand, I was thinking if it was possible to use https://swagger.io/tools/swagger-codegen/ to generate the client SDK from your swagger/OpenAPI documentation and then release the python* client SDK whenever you release a new version of netmaker. This client SDK should then be pushed to https://pypi.org/.

* if a golang SDK was created, it would open the possibility of creating a terraform provider

\Mathias

cocoonkid commented 1 year ago

This would be very nice.