JsonApiDotNetCore icon indicating copy to clipboard operation
JsonApiDotNetCore copied to clipboard

Support for Kiota

Open bkoelman opened this issue 1 year ago • 3 comments

Add support for using Kiota to generate a C# client, aside from the existing NSwag support.

  • Rename JsonApiDotNetCore.OpenApi.Client to JsonApiDotNetCore.OpenApi.Client.NSwag
  • Create sample
    • Consider switching to Worker Service project template, so we can use IHttpClientFactory from the IoC container
    • Investigate how to re-generate the client code during build
  • Create tests
    • Make server-side tests write their swagger.g.json elsewhere during testrun, not directly into the client project(s)
  • Update documentation

An initial experiment is available at https://github.com/json-api-dotnet/JsonApiDotNetCore/tree/openapi-tryout-kiota.

bkoelman avatar Feb 07 '24 09:02 bkoelman

Related: should set OutputPath for NSwag in the example project and/or LegacyOpenApiIntegration. This makes it easy to spot how the generated client changes when trying out different switches or updating to a newer version.

bkoelman avatar Feb 10 '24 11:02 bkoelman

Should include a test that verifies public IDictionary<string, object> AdditionalData { get; set; } is only generated for meta properties.

bkoelman avatar Feb 12 '24 00:02 bkoelman

Should clean up references to Swashbuckle* packages.

bkoelman avatar Feb 16 '24 10:02 bkoelman