Skip to content

Lesly/recipe api endpoints - #55

Merged
Yooze0x4c8 merged 6 commits into
mainfrom
lesly/recipe_api_endpoints
Oct 21, 2026
Merged

Yooze0x4c8 merged 6 commits into
mainfrom
lesly/recipe_api_endpoints

Conversation

@leslyVillanueva1020

Copy link
Copy Markdown
Collaborator

Closes #52 and Closes #44

What changed

  • Added recipe request and response records:
    • RecipeCreate
    • RecipePatch
    • RecipeResponse
  • Added RecipeRepository
  • Added RecipeService
  • Added RecipeController
  • Implemented recipe endpoints for:
    • Listing paginated and sortable recipes
    • Creating recipes with existing ingredients
    • Viewing one recipe
    • Fully replacing a recipe with PUT
    • Partially updating a recipe with PATCH
    • Deleting a recipe
  • Added ingredient lookup and validation.
  • Added ownership checks so users can only update or delete their own recipes.
  • Added appropriate HTTP responses for create, update, and delete operations.

How I tested it

  • ./gradlew test
  • ./gradlew clean build

Reviewers

2 approving teammates who are not the author (1 for a team of 3).

@Solian21 Solian21 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think one of the biggest things is the CI test that is currently failing. I would also say looking at the comment about NotBlank that way we can assure that our recipes have names to them.

@Size(min = 1, message = "Name must not be blank")
String name,

Set<Long> ingredientIds,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same review at RecipeCreate

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still appears unresolved. Using ingredientIds here is fine, but docs/openapi.yaml still defines ingredients as an array of objects in both RecipeCreate and RecipePatch. Please update those request schemas to match the code before resolving this comment.

@Solian21
Solian21 self-requested a review October 20, 2026 23:15
Solian21
Solian21 previously approved these changes Oct 20, 2026

@Solian21 Solian21 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome this looks good to be

@Size(min = 1, message = "Name must not be blank")
String name,

Set<Long> ingredientIds,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still appears unresolved. Using ingredientIds here is fine, but docs/openapi.yaml still defines ingredients as an array of objects in both RecipeCreate and RecipePatch. Please update those request schemas to match the code before resolving this comment.

Yooze0x4c8
Yooze0x4c8 previously approved these changes Oct 21, 2026

@Yooze0x4c8 Yooze0x4c8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@annabelleb20 annabelleb20 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really great!

@Solian21 Solian21 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loosk goo to me!

@Yooze0x4c8
Yooze0x4c8 merged commit 884b836 into main Oct 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants