fix: AmbiguousMatchException on /scalar endpoint #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/scalar-route-ambiguity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix: AmbiguousMatchException on /scalar endpoint
The bug
The Scalar UI had a two-endpoint redirect pattern:
ASP.NET Core routing treats
/scalarand/scalar/as the same URL — trailing slashes are insignificant. Both endpoints became candidates for either request →AmbiguousMatchExceptionon every request.Diagnosis
Claude's analysis is correct. This was latent from PR #13 (Scalar UI) but only surfaced in production once the path prefix was removed.
Fix
Collapsed to a single endpoint that serves the HTML directly — no redirect:
Both
/scalarand/scalar/resolve to this one handler. No ambiguity.Summary
Summary
Coverage
DoujinManager.ApplicationCore - 84.8%
DoujinManager.Infrastructure - 91.6%
pshot
DoujinManager.RestAdapter - 83.9%
E5CB12CEAC5BBBEA65844E1C05F9ADA4DA38B848075C41304FC6A1ABF77__ValidationAttr
ibuteCache
DoujinManager.Server - 16.7%