Skip to content

net11.0: OpenAPI transformers under OpenAPI 3.2, server-sent events and union return types #214

Open

Description

@CaffeinatedCoder

Goal

Show that TypeKit's OpenAPI transformers stay correct under Microsoft.AspNetCore.OpenApi 11. These checks are owed by the net11.0 target (#208).

Three changes in ASP.NET Core 11 (What's new):

  • OpenAPI 3.2 is the default document version (OpenApiSpecVersion.OpenApi3_2), built on Microsoft.OpenApi 3.3.1.
  • A server-sent events response is described with OpenAPI 3.2's itemSchema.
  • A union return type is described as anyOf with a $ref to each case's schema.

Checks

  1. The document version. A value object's schema is its wrapped type's, with its description, under both 3.2 and 3.1 (options.OpenApiVersion). The same holds for a closed set and for a fault response.
  2. Unions moved to net11.0: a union over value objects, in a woven project, keeps its JSON and OpenAPI schema (Metalama 2027) #272 on 2026-10-31. An endpoint returning a union with a value-object case needs the union declared in a woven project at C# 15, which Metalama 2026.1 doesn't give (decision 120); it waits for Move the Generators package to Metalama 2027.0 in 2.4.0 (decisions 120 and 129) #173, which decision 129 moved into 2.4.0.
  3. A Result as an HTTP response. Its fault responses keep their schemas next to ASP.NET Core 11's multiple Produces per status code.
  4. The transformer API. IOpenApiSchemaTransformer and IOpenApiOperationTransformer compile unchanged against Microsoft.OpenApi 3.x. If not, the net11.0 asset gets its own code path, and the shared behaviour is tested on both targets.
  5. Server-sent events. An SseItem<T> returned through TypedResults.ServerSentEvents is described with OpenAPI 3.2's itemSchema under text/event-stream (feat: adds support for describing SSE in OpenAPI 3.2.0 dotnet/aspnetcore#67461). With T a value object or a closed set, the payload schema inside itemSchema is the wrapped type's or the set's, with its description. Reading the diff, schema transformers run on the payload's schema and not on the wrapper around it: measure that, and the shape under 3.1.

Done when

The checks run in the net11.0 test run against OpenAPI 11. The floor raise is named in the changelog (decision 120, rule 1). Each disagreement is an issue of its own.

Activity

  1. added this to the 2.4.0 milestone on Oct 30, 2026
  2. added
    tests
    package/aspnetcore
    on Oct 30, 2026
  3. changed the title [-]net11.0: OpenAPI transformers under OpenAPI 3.2 and union return types[/-] [+]net11.0: OpenAPI transformers under OpenAPI 3.2, server-sent events and union return types[/+] on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package/aspnetcoretests

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions