Skip to content

refactor(abstractions)!: merge IAsyncParseNodeFactory into IParseNodeFactory#709

Merged
MIchaelMainer merged 9 commits into
mmainer/updateTargetFxfrom
mmainer/updateTargetFx+breaks
May 5, 2026
Merged

refactor(abstractions)!: merge IAsyncParseNodeFactory into IParseNodeFactory#709
MIchaelMainer merged 9 commits into
mmainer/updateTargetFxfrom
mmainer/updateTargetFx+breaks

Conversation

@MIchaelMainer

@MIchaelMainer MIchaelMainer commented May 4, 2026

Copy link
Copy Markdown
Member

Summary

Merges IAsyncParseNodeFactory into ParseNodeFactory and removes all obsolete synchronous deserialization APIs, taking advantage
of the major version bump.

Changes

Interface consolidation

  • Deleted IAsyncParseNodeFactory interface
  • Updated IParseNodeFactory — removed sync GetRootParseNode, added GetRootParseNodeAsync
  • Simplified ParseNodeProxyFactory — calls _concrete.GetRootParseNodeAsync() directly (no runtime type check)
  • Simplified ParseNodeFactoryRegistry — removed generic GetFactory<T>, replaced with non-generic GetFactory

Removed obsolete sync APIs

  • KiotaSerializer.Deserialize / DeserializeCollection
  • KiotaJsonSerializer.Deserialize / DeserializeCollection
  • Sync GetRootParseNode from all factory implementations

Updated factory implementations

  • JsonParseNodeFactory, FormParseNodeFactory, TextParseNodeFactory — now implement IParseNodeFactory directly with only the
    async method
  • HttpClientRequestAdapter — calls GetRootParseNodeAsync directly without is IAsyncParseNodeFactory branching

Public API tracking

  • Updated PublicAPI.Shipped.txt in abstractions, serialization-json, serialization-form, and serialization-text

Tests

  • Replaced Mock<IAsyncParseNodeFactory> with Mock<IParseNodeFactory>
  • Converted sync test methods to async
  • Updated mock setups to use GetRootParseNodeAsync / ReturnsAsync

Breaking Changes

  • IAsyncParseNodeFactory removed — implement IParseNodeFactory.GetRootParseNodeAsync instead
  • Sync Deserialize/DeserializeCollection methods removed — use DeserializeAsync/DeserializeCollectionAsync
  • ParseNodeFactoryRegistry.GetFactory<T>() removed — use GetFactory() (non-generic)

MIchaelMainer and others added 5 commits May 4, 2026 15:40
…Factory

Remove IAsyncParseNodeFactory interface and move GetRootParseNodeAsync
into IParseNodeFactory. Remove the obsolete sync GetRootParseNode method
from the interface. Simplify ParseNodeProxyFactory and
ParseNodeFactoryRegistry to use the unified interface directly.

BREAKING CHANGE: IAsyncParseNodeFactory has been removed. Implement
IParseNodeFactory.GetRootParseNodeAsync directly instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove KiotaSerializer.Deserialize, KiotaSerializer.DeserializeCollection,
and their KiotaJsonSerializer counterparts. Only the async variants
(DeserializeAsync, DeserializeCollectionAsync) remain.

BREAKING CHANGE: Sync Deserialize/DeserializeCollection methods have been
removed. Use DeserializeAsync/DeserializeCollectionAsync instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nterface

Remove obsolete sync GetRootParseNode from JsonParseNodeFactory,
FormParseNodeFactory, and TextParseNodeFactory. Simplify
HttpClientRequestAdapter to call GetRootParseNodeAsync directly
without runtime type checking.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove entries for IAsyncParseNodeFactory, sync GetRootParseNode,
sync Deserialize/DeserializeCollection methods, and the generic
GetFactory<T> method. Add entries for the new GetRootParseNodeAsync
on IParseNodeFactory and the non-generic GetFactory method.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace IAsyncParseNodeFactory mocks with IParseNodeFactory. Convert
sync GetRootParseNode calls to async GetRootParseNodeAsync. Update
deserialization tests to use async DeserializeAsync/DeserializeCollectionAsync.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
MIchaelMainer and others added 3 commits May 4, 2026 16:35
Coverlet.MTP generates coverage files with a timestamp suffix
(e.g., coverage.opencover.040526233344598.xml) rather than a fixed
filename. Update the SonarCloud workflow to use a glob pattern that
matches the timestamped files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…odeAsync

Verify that the proxy factory:
- Delegates to the concrete factory
- Invokes onBefore/onAfter callbacks
- Preserves original node callbacks alongside proxy callbacks
- Throws ArgumentNullException when concrete is null

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… methods

Remove GetPartValue<T>(string) and RemovePart(string) overloads that
were marked with 'TODO: Remove with next major release'. Callers should
use the overloads that accept (partName, fileName) instead.

BREAKING CHANGE: GetPartValue<T>(string) and RemovePart(string) removed

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@MIchaelMainer MIchaelMainer marked this pull request as ready for review May 5, 2026 00:12
@MIchaelMainer MIchaelMainer requested a review from a team as a code owner May 5, 2026 00:12
Comment thread src/abstractions/serialization/KiotaSerializer.Deserialization.cs
@MIchaelMainer MIchaelMainer merged commit 1836a32 into mmainer/updateTargetFx May 5, 2026
4 checks passed
@MIchaelMainer MIchaelMainer deleted the mmainer/updateTargetFx+breaks branch May 5, 2026 00:51
@github-project-automation github-project-automation Bot moved this to Done ✔️ in Kiota May 5, 2026
@sonarqubecloud

sonarqubecloud Bot commented May 5, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants