Skip to content

[codex] Remove MergePatchTarget attribute#79

Merged
mxtordev merged 2 commits into
mainfrom
codex/remove-mergepatchtarget
Jul 5, 2026
Merged

[codex] Remove MergePatchTarget attribute#79
mxtordev merged 2 commits into
mainfrom
codex/remove-mergepatchtarget

Conversation

@mxtordev

@mxtordev mxtordev commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Removes the additional-target mapping feature from the public API. Patch DTOs now target either zero types for presence-only handling or one contract through [MergePatch(typeof(T))], where T can still be an interface.

Changes

  • Deleted MergePatchTargetAttribute from the runtime package.
  • Stopped the generator from collecting additional target attributes.
  • Removed multi-target tests and dead test scaffolding.
  • Updated diagnostics coverage to keep invalid primary target handling covered.
  • Removed the README bullet that documented additional target overloads.

Impact

This is a breaking API cleanup for users of [MergePatchTarget]. The intended replacement for shared target shape is an interface target via [MergePatch(typeof(IMyContract))]; divergent target behavior should use separate DTOs or targetless manual application with Has.

Validation

  • dotnet test MergePatchDto.slnx
  • dotnet pack src/MergePatchDto/MergePatchDto.csproj -c Release

@mxtordev mxtordev marked this pull request as ready for review July 5, 2026 19:43
@mxtordev mxtordev marked this pull request as draft July 5, 2026 19:43
@mxtordev mxtordev marked this pull request as ready for review July 5, 2026 19:43
@mxtordev mxtordev merged commit db174de into main Jul 5, 2026
1 check passed
@mxtordev mxtordev deleted the codex/remove-mergepatchtarget branch July 5, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant