I personally am not a huge fan of Swagger, but I know people love it and swear by it. So if that is something that interests you go for it.
If your goal though is to re-write some scripts …
and …
If you are lazy I would focus more specifically on just one of your scripts you want to port over and figure out the 1 or 2 API calls you need to make to re-write the script and go from there.