by 10000truths · 2y ago · 0 comments
For other languages, I suppose it's an organizational effort within MS to standardize and consolidate SDK generation to produce consistent experience.
More on .NET, last time I compared OpenAPI generator options - other generators did not do this or did it in a worse way.
Even still, I do not consider Kiota to have the kind of UX that .NET deserves.
For example, to consume gRPC-based API, your workflow is just:
dotnet add package Grpc.Tools
dotnet add package Grpc.Net.Client
dotnet add package Google.Protobuf
# add <Protobuf Include="myapi.proto" /> to .csproj
That's it - the client is generated transiently and is a part of the project without getting in your way, I have a small shell script to do it as a one-liner. And maintaining a dependency of an application on a remote API of this kind is also easy if .proto is available via git - add it as a submodule or a subtree and just bump commits automatically (or manually if review is needed).You never need to manually re-generate and possibly re-reference or re-publish a separate client package for this to work. The sheer convenience of this at both individual and organizational level alone makes a compelling case for choosing gRPC over REST, architectural preferences notwithstanding.
Last time I checked, Kiota required much more effort and ceremony. I understand that it's a "big generator to rule them all" that made to address both simple one-off APIs and ginormous Azure SDK, but .NET has all necessary building blocks to have similar or even better UX to what gRPC tooling provides. I suppose, it's just a matter of doing it and promoting the project.
The only set of public SDKs generated by kiota from Microsoft are the Microsoft Graph SDKs.
Just get a spec, run kiota,and check the output.
Compare with the output from, say, openapi generator.
No one can miss the difference.