Pre-fill list section on product pick; tighten backend warnings

- Adds GET /api/products/{kind}/{id}/section?storeId=... exposing the
  per-store memory the list page mirrors when a product is picked, so the
  section dropdown reflects what the backend would auto-assign on POST.
- Treats backend warnings as errors via Directory.Build.props; fixes the
  surfaced warnings (obsolete PostgreSqlBuilder ctor, nullable string[]
  in IsEquivalentTo, redundant nullable flow).
- Annotates wire-exposed enums (ProductKind, UnitKind, UnitCategory,
  UnitCategoryFlags) with JsonStringEnumConverter so they round-trip as
  strings regardless of caller options. Unblocks the integration tests
  that deserialize DTOs via GetFromJsonAsync without the global converter.
This commit is contained in:
Josh Rogers
2026-05-15 21:30:00 -05:00
parent f38530cf81
commit 6d84aad94b
11 changed files with 205 additions and 28 deletions
@@ -1,4 +1,3 @@
using Microsoft.EntityFrameworkCore;
using Npgsql;
using Testcontainers.PostgreSql;
using TUnit.Core.Interfaces;
@@ -16,8 +15,7 @@ public sealed class PostgresFixture : IAsyncInitializer, IAsyncDisposable
{
private const string TemplateDbName = "yeschef_template";
private readonly PostgreSqlContainer _container = new PostgreSqlBuilder()
.WithImage("postgres:17")
private readonly PostgreSqlContainer _container = new PostgreSqlBuilder("postgres:17")
.WithDatabase("postgres")
.WithUsername("postgres")
.WithPassword("postgres")