Unify API route parameters, return IResult everywhere, merge picture upload DTOs and centralize validation limits

Guid and long route constraints, id/trackId parameter names, Update*Request without the New prefix,
sentence-case operation summaries, shared security scheme id and a single Limits class.
This commit is contained in:
2026-09-24 12:36:48 +02:00
parent 405df082cc
commit fcf3093ad8
38 changed files with 740 additions and 829 deletions
@@ -7,15 +7,15 @@ public sealed class UpdateAlbumRequestValidator : AbstractValidator<UpdateAlbumR
{
public UpdateAlbumRequestValidator()
{
RuleFor(x => x.NewTitle)
RuleFor(x => x.Title)
.NotEmpty()
.MaximumLength(200);
.MaximumLength(Limits.AlbumTitle);
RuleFor(x => x.NewDescription)
.MaximumLength(256);
RuleFor(x => x.Description)
.MaximumLength(Limits.Description);
RuleFor(x => x.NewReleaseYear)
.InclusiveBetween(AlbumReleaseYear.Earliest, AlbumReleaseYear.Latest)
.When(x => x.NewReleaseYear.HasValue);
RuleFor(x => x.ReleaseYear)
.InclusiveBetween(Limits.EarliestReleaseYear, Limits.LatestReleaseYear)
.When(x => x.ReleaseYear.HasValue);
}
}