json-api-dotnet / JsonApiDotNetCore

A framework for building JSON:API compliant REST APIs using ASP.NET and Entity Framework Core.

Home Page:https://www.jsonapi.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Kiota

bkoelman opened this issue · 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, see microsoft/kiota#3005
  • 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.

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.

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

Should clean up references to Swashbuckle* packages.