Repository navigation
fix!: support Microsoft.OData.Edm 9 and drop .NET versions below 10 - #940
Merged
Merged
Conversation
Multi-target the reader for net8.0 (Microsoft.OData.Edm 8.4.4) and net10.0 (Microsoft.OData.Edm 9.0.0), since Edm 9 only supports .NET 10 and is binary incompatible with 8.x. - Replace the removed GetReturn() extension with IEdmOperation.ReturnType, available in both Edm versions. - Convert Edm 9 DateOnly values for revision dates and format DateOnly/TimeOnly example values as invariant OData literals. - Let Hidi take Edm from the reader so .NET 10 consumers do not get a package downgrade. - Run the reader tests on net8.0 and net10.0. Replace the IEdmModel Moq proxy, which cannot implement Edm 9 ReadOnlySpan members, and declare key properties in invalid test models. Fixes #937 Co-authored-by: Copilot <[email protected]> Copilot-Session: 26ff6e74-45c7-4932-bfa8-11c1c74d16e1
Vincent Biret (baywet)
added a commit
to microsoft/kiota-samples
that referenced
this pull request
Nov 11, 2026
The OpenAPI YAML writer quotes the version (openapi: '3.1.2'). Verified against microsoft/OpenAPI.NET.OData#940. Co-authored-by: Copilot <[email protected]> Copilot-Session: 26ff6e74-45c7-4932-bfa8-11c1c74d16e1
Co-authored-by: Copilot <[email protected]> Copilot-Session: 26ff6e74-45c7-4932-bfa8-11c1c74d16e1
Target net10.0 only and depend solely on Microsoft.OData.Edm 9, removing the net8.0 multi-targeting and conditional compilation. .NET 8 is out of support for this release line. BREAKING CHANGE: Microsoft.OpenApi.OData and Hidi now target .NET 10 only and require Microsoft.OData.Edm 9.x. Consumers on earlier runtimes or Edm 8.x must stay on the previous major version. Co-authored-by: Copilot <[email protected]> Copilot-Session: 26ff6e74-45c7-4932-bfa8-11c1c74d16e1
- Install only the .NET 10 SDK in the GitHub workflows. - Point Sonar at coverage.opencover.xml: with a single target framework, coverlet no longer suffixes the report with the TFM, so the previous coverage.net*.opencover.xml glob matched nothing. Co-authored-by: Copilot <[email protected]> Copilot-Session: 26ff6e74-45c7-4932-bfa8-11c1c74d16e1
- Remove the unused obsolete ODataConstants.OdataCount field (superseded by CreateOdataCount). - Remove the CreateOrderBy/CreateSelect/CreateExpand overloads taking IEdmEntityType that only forwarded to the IEdmStructuredType overloads, and move their documentation to those overloads. Co-authored-by: Copilot <[email protected]> Copilot-Session: 26ff6e74-45c7-4932-bfa8-11c1c74d16e1
The EsrpCodeSigning tasks were upgraded and no longer need the .NET 6 runtime, so drop the UseDotNet 6.x steps from the Azure pipelines. Co-authored-by: Copilot <[email protected]> Copilot-Session: 26ff6e74-45c7-4932-bfa8-11c1c74d16e1
|
Gavin Barron (gavinbarron)
marked this pull request as ready for review
November 12, 2026 21:38
Contributor
|
Thanks for your work here Vincent Biret (@baywet) I'm of the opinion that we ship this as v4.0.0 and deprecate v3.x I'll work on getting this reviewed here. |
Gavin Barron (gavinbarron)
approved these changes
Nov 12, 2026
This was referenced Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fixes #937. Related: #833.
The reader (
Microsoft.OpenApi.OData), Hidi and the tooling projects now target .NET 10 only (.NET 8 is out of support) and depend onMicrosoft.OData.Edm9.x. Consumers on earlier runtimes or Edm 8.x need to stay on the previous major version.Problem
Microsoft.OData.Edm9.0.0 removedExtensionMethods.GetReturn(IEdmOperation)and replacedDate/TimeOfDaywithDateOnly/TimeOnly. It also supports only .NET 10. The published reader is compiled against Edm 8.x, so on Edm 9 conversion fails withMissingMethodException.Changes
net10.0(net10.0-windowsfor OoasGui) and reference Edm 9.0.0. There is no multi-targeting or conditional compilation.GetReturn()→IEdmOperation.ReturnTypeat every call site.DateOnlytoDateTime.ODataPrimitiveValue.ToString()formatsDateOnly/TimeOnlyas invariant OData literals (yyyy-MM-dd,HH:mm:ss.fffffff) instead of culture-dependent strings like3:38 PM.AnalysisMode=Alltreats as errors:IsEnabled.Regex.IsMatch.LoggerandOpenApiSpecVersionHelperinternal.net8.0output/package paths in the pipelines and scripts.coverage.opencover.xml; with a single target framework, coverlet no longer adds the TFM suffix to the report name.runtime:10.0-noble-chiseled.IEdmModelproxy in the annotation-cache tests with a countingEdmModelsubclass, because Castle cannot proxy Edm 9'sReadOnlySpan<char>members.idkey property in fiveODataPathProviderTestsmodels that referenced an undeclared key (Edm 9 returnsnullthere).CsdlWriter.TryWriteCsdloverload withoutCsdlTarget.dotnet formatalso normalized existing whitespace in the touched files; use Hide whitespace to review the substantive diff.Validation
net10.0.Microsoft.OData.Core9.0.0,Microsoft.AspNetCore.OData10.0.0-preview.2) generates/openapi/openapi.yaml, and all 11 sample tests pass. That sample migration is blocked on this fix: chore: migrate sample API and .NET client to .NET 11 (blocked by OData 9) kiota-samples#9364.