Goal
Add a public (unauthenticated) endpoint that serves a recipe by its slug, enabling public sharing of published recipes.
Spec reference
docs/specs/recipe-creation-target-architecture.md — §"Public recipe endpoints"
Implementation notes
GET /public/recipe/{slug} — in the /public route group from E6.5; no RequireAuthorization()
- Resolves active
RecipePublication by slug (where UnpublishedAtUtc IS NULL)
- Returns
RecipeDetail DTO (same shape as authenticated detail)
- 404 if no active publication for slug
- Emits
RecipeViewed outbox event (unauthenticated variant): { recipeId, viewerUserId: null, isAuthenticated: false, timestamp }
Acceptance criteria
Testing
- Integration tests: valid slug, unpublished slug, never-published slug all handled correctly
- Integration test:
RecipeViewed event written on public read
Part of#1103
Goal
Add a public (unauthenticated) endpoint that serves a recipe by its slug, enabling public sharing of published recipes.
Spec reference
docs/specs/recipe-creation-target-architecture.md— §"Public recipe endpoints"Implementation notes
GET /public/recipe/{slug}— in the/publicroute group from E6.5; noRequireAuthorization()RecipePublicationby slug (whereUnpublishedAtUtc IS NULL)RecipeDetailDTO (same shape as authenticated detail)RecipeViewedoutbox event (unauthenticated variant):{ recipeId, viewerUserId: null, isAuthenticated: false, timestamp }Acceptance criteria
RecipeDetailwithout authenticationRecipeViewedoutbox event written withisAuthenticated: falseTesting
RecipeViewedevent written on public readPart of#1103