Repository navigation
chore: migrate sample API and .NET client to .NET 11 (blocked by OData 9) - #9364
Merged
Merged
Conversation
--- updated-dependencies: - dependency-name: Microsoft.Extensions.Configuration.Binder dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
--- updated-dependencies: - dependency-name: Microsoft.Extensions.Configuration.Json dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
--- updated-dependencies: - dependency-name: Microsoft.OData.Core dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
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
Co-authored-by: Copilot <[email protected]> Copilot-Session: 26ff6e74-45c7-4932-bfa8-11c1c74d16e1
Update CI and current direct dependencies, remove incompatible Upgrade Assistant analyzers, and add an OpenAPI endpoint regression test. The OpenAPI test intentionally reproduces microsoft/OpenAPI.NET.OData#937; keep this migration draft until upstream OData 9 compatibility is available. Co-authored-by: Copilot <[email protected]> Copilot-Session: 26ff6e74-45c7-4932-bfa8-11c1c74d16e1
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
- rewrite ToDoItemsController as an [ApiController] with an isComplete query filter and a plain JSON array list response - use a ToDoItemUpdate model for PATCH instead of Delta<T> - generate the OpenAPI 3.1 description with Microsoft.AspNetCore.OpenApi at the same /openapi/openapi.yaml URL and drop all OData packages - regenerate the dotnet, go, java and typescript clients with Kiota 1.38 and update the client apps (filter demo replaces select) - move clients to current Kiota dependencies (dotnet/TS bundle, TS ESM) Co-authored-by: Copilot <[email protected]> Copilot-Session: 26ff6e74-45c7-4932-bfa8-11c1c74d16e1
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.
Summary
Migrate the sample API, its integration tests and all sample clients to current tooling:
net11.0. CI uses .NET 11, and also builds the .NET client when it or the workflow changes.API changes
ToDoItemsControlleris a regular[ApiController]. Routes stay the same:GET/POST /ToDoItems,GET/PATCH/DELETE /ToDoItems/{id}.$select, which is uncommon in plain REST APIs.GET /ToDoItemsnow accepts an optionalisCompletequery parameter instead, and the client samples demo filtering with it.nextLinkor thevaluewrapper beyond reading the items.ToDoItemUpdatemodel with nullable properties (replacingDelta<T>). Only the provided properties are applied.201with aLocationheader.Microsoft.AspNetCore.OpenApi, pinned to OpenAPI 3.1 (.NET 11 defaults to 3.2), and still served at/openapi/openapi.yaml.integer | string.Microsoft.AspNetCore.OData,Microsoft.OData.Core,Microsoft.OData.ModelBuilder,Microsoft.OpenApi.OData,Swashbuckle.AspNetCoreand the directMicrosoft.OpenApireference.Client changes
Microsoft.Kiota.Bundle(the generated client needs the multipart serializer) plusMicrosoft.Kiota.Authentication.Azure2.1.6.typemaps toSetTypeEscaped.jakarta.annotation-api3.0.0. App code moved to the synchronous Kiota Java API.makesdk.batwas missing thegenerateverb.commons-text1.15.0,junit-jupiter6.1.3,azure-identitypinned to 1.19.0.type: module,nodenext, output indist/). Uses@microsoft/kiota-bundle(DefaultRequestAdapter) and the interface/factory model style.ts-nodeandisomorphic-fetchremoved (Node has nativefetch).@types/nodeadded.Integrated Dependabot branches
These branches were merged locally into this branch, preserving their commits. The original pull requests were not merged, closed or edited:
These are references only, not closing keywords.
Local validation
dotnet testpasses 8/8 (.NET SDK 11.0.100). The tests now coverisCompletefiltering, theLocationheader on create, and the OpenAPI document shape.https://localhost:7206/openapi/openapi.yaml.go buildandgo vetpass.tscpasses and prettier is clean.gradle buildpasses (JDK 21,gradle:9-jdk21container).dotnet list package --outdatedreports no outdated packages for API, tests or client, and none are vulnerable.go list -m -ushows no outdated direct Go modules.npm outdatedshows only major dev-tool bumps (TypeScript 7, ESLint 10), which are out of scope here.dotnet formatapplied to changed C# files.This checkout sits under another repository's configuration. Local SDK commands used
-p:ManagePackageVersionsCentrally=false, and tests ran from outside the parent tree. These environment-specific overrides are not added to CI.