Generate Go client for Management API using swagger

Hi, I want to generate a Go client for the management API using the swagger definition, however I can’t find the swagger.json anywhere - can someone point me in the right direction please? Thanks, Mark

1 Like

Well, after much searching and hacking around I found the swagger 1.2 definition in the html of the api docs. Yay me.

base url: https://${tenant},

Thanks so much for finding this! Did you ever get a client generated?

Hey Ryan, yeah I did manage to generate a client in the end, but I wanted a swagger 2 client, so had to go around the houses a bit. I published a gist here that has a couple of scripts I used to generate the client. You need to install GitHub - LucyBot-Inc/api-spec-converter: Convert API descriptions between popular formats such as OpenAPI(fka Swagger), RAML, API Blueprint, WADL, etc. and the swagger generator to get it to work.

message board stripped the link from the comment. Here’s the gist: auth0 go swagger client generation · GitHub

Thanks. I was able to gen one as well after converting it to a swagger v2 spec. Unfortunately I had to hand massage some of gen’d files to compile correctly. I’ve also run into problems regarding some of the types and API responses so all in all, not a great experience.