Repository navigation
Description
Summary
Microsoft.OpenApi.OData 3.2.1 fails at runtime with stable Microsoft.OData.Core / Microsoft.OData.Edm 9.0.0. This blocks updating the Kiota sample API's OData dependencies while migrating to .NET 11.
Related: #833 describes the same missing-method failure with 9.0.0-rc and anticipates a subsequent release restoring compatibility. This report confirms the failure with the published stable 9.0.0 package.
Reproduction
The affected sample is https://github.com/microsoft/kiota-samples/tree/main/sample-api/api. Update its target to net11.0 and use:
| Package | Version |
|---|---|
| Microsoft.AspNetCore.OData | 10.0.0-preview.2 |
| Microsoft.OData.Core | 9.0.0 |
| Microsoft.OData.Edm (transitive) | 9.0.0 |
| Microsoft.OData.ModelBuilder | 3.0.0 |
| Microsoft.OpenApi.OData | 3.2.1 |
| Microsoft.OpenApi | 3.11.0 |
Generate an EDM model and convert it as the sample's OpenApiController does:
var builder = new ODataConventionModelBuilder();
builder.EnableLowerCamelCase();
builder.EntitySet<ToDoItem>("ToDoItems");
var model = builder.GetEdmModel();
var document = model.ConvertToOpenApi(new OpenApiConvertSettings
{
ServiceRoot = new Uri("https://localhost:7206/"),
EnableKeyAsSegment = true,
PrefixEntityTypeNameBeforeKey = true
});Requesting /openapi/openapi.yaml returns HTTP 500. A WebApplicationFactory integration test reproduces it. The sample's existing 10 CRUD/query tests pass with these versions; the new OpenAPI endpoint test fails.
Actual result
System.MissingMethodException: Method not found: 'Microsoft.OData.Edm.IEdmOperationReturn Microsoft.OData.Edm.ExtensionMethods.GetReturn(Microsoft.OData.Edm.IEdmOperation)'.
at Microsoft.OpenApi.OData.Edm.ODataPathProvider.RetrieveBoundOperationPaths(OpenApiConvertSettings convertSettings)
at Microsoft.OpenApi.OData.Edm.ODataPathProvider.GetPaths(IEdmModel model, OpenApiConvertSettings settings)
at Microsoft.OpenApi.OData.Edm.ODataContext.LoadAllODataPaths()+MoveNext()
at Microsoft.OpenApi.OData.Edm.ODataContext.get_AllPaths()
at Microsoft.OpenApi.OData.Generator.OpenApiPathItemGenerator.AddPathItemsToDocument(ODataContext context, OpenApiDocument document)
at Microsoft.OpenApi.OData.EdmModelOpenApiExtensions.ConvertToOpenApi(IEdmModel model, OpenApiConvertSettings settings)
Expected result
A published converter version compatible with stable OData EDM 9.0.0 should generate the sample's OpenAPI description without a missing-method exception. Please clarify the supported combination and release plan for OData 9 compatibility.
Environment
- .NET SDK 11.0.100; ASP.NET Core runtime 11.0.0
- Windows ARM64
- Latest published Microsoft.OpenApi.OData package available from the configured NuGet source: 3.2.1
The dependent update is microsoft/kiota-samples#9360. Keeping ASP.NET Core OData 9.5.0 is not an alternative for Core 9, because it constrains Core/EDM to < 9.0.0.
Activity
baywet commentedon Nov 11, 2026
Reproduction in the .NET 11 sample migration: microsoft/kiota-samples#9364 (draft, intentionally blocked). It includes an enabled failing OpenAPI endpoint integration test. The API/test/client projects build successfully; 10 existing CRUD/query tests pass and the new OpenAPI test fails with the GetReturn MissingMethodException described above. A local running API also reproduces HTTP 500 for /openapi/openapi.yaml.
chore: migrate sample API and .NET client to .NET 11