A util tool to generate a client from the Swagger spec of Nakama's server API.
go run main.go "$GOPATH/src/github.com/heroiclabs/nakama/apigrpc/apigrpc.swagger.json" "Nakama" > ../Nakama/ApiClient.gen.cs
To generate a client for the Nakama Console, run the following:
go run main.go "$GOPATH/src/github.com/heroiclabs/nakama/console/console.swagger.json" "NakamaConsole" > ../Nakama/Console/ConsoleClient.gen.cs
To generate a client for Satori, run the following:
go run main.go "${SATORI}/api/satori.swagger.json" "Satori" > ../Satori/ApiClient.gen.cs
To generate a client for the Satori Console, run the following:
go run main.go "${SATORI}/console/console.swagger.json" "Satori" > ../Satori/ConsoleClient.gen.cs
We want to maintain a simple lean low level client within our C# client which has minimal dependencies so we built our own. This gives us complete control over the dependencies required and structure of the code generated.
The generated code is designed to be supported within Unity engine, Xamarin, Godot engine, and other projects. It requires .NET4.5 framework, TinyJson, and uses System.Threading.Tasks
.
The code generator has only been checked against the Swagger specification generated for Nakama server. YMMV.