Skip to content

Support OpenApi Schema Service in CommunityToolkit.Datasync.Server.OpenApi #266

@adrianhall

Description

@adrianhall

In .NET 9, we can't inject the entity schema into the OpenApi definition when using the new .NET9 AddOpenApi / MapOpenApi.

This is because:

  • OpenApiSchemaService is internal sealed and in a different assmebly (preventing reflection)
  • We cannot add a [Consumes<T>] or [ProducesResponseType<T>] to the controller method (since TableController is generic)

In Swashbuckle and NSwag, we generate the schema for the entity type, but this is not possible in .NET 9 OpenApi.

Once Microsoft.AspNetCore.OpenApi allows us to inject schema (or C# allows us to add attributes based on a generic type), we can add such functionality to the OpenApi transformers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ServerImprovements or additions to the server code

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions