Skip to content

Conversation

Copy link

Copilot AI commented Jan 13, 2026

Adds comprehensive test coverage for the UseHttpPutForUpdate setting introduced to control default update verb behavior.

Test Coverage

  • EntityPathItemHandler: Verifies setting controls PUT vs PATCH for entity updates
  • NavigationPropertyPathItemHandler: Tests both single and collection navigation property updates
  • ComplexPropertyItemHandler: Validates update method selection for complex properties
  • Annotation precedence: Confirms UpdateRestrictions annotations override the global setting

All tests verify:

  1. Default behavior (UseHttpPutForUpdate = false) uses PATCH
  2. Enabled setting (UseHttpPutForUpdate = true) uses PUT
  3. Explicit UpdateMethod annotations take precedence over setting
var settings = new OpenApiConvertSettings
{
    UseHttpPutForUpdate = true  // Use PUT instead of PATCH for updates
};
var document = model.ConvertToOpenApi(settings);

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
@baywet baywet marked this pull request as ready for review January 13, 2026 13:03
@baywet baywet requested a review from a team as a code owner January 13, 2026 13:03
Copilot AI changed the title [WIP] Add switch to use PUT as default update verb Add unit tests for UseHttpPutForUpdate setting Jan 13, 2026
Copilot AI requested a review from baywet January 13, 2026 13:04
@sonarqubecloud
Copy link

@baywet baywet merged commit cec524a into feat/use-put-for-update Jan 13, 2026
10 checks passed
@baywet baywet deleted the copilot/sub-pr-770 branch January 13, 2026 13:11
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.

2 participants