Delete feedbackv1.0.0 · JSON Schema
Deletes an existing feedback record by its UUID.
1. Remove an Existing Book Review
A moderator or admin deletes a specific feedback record by its UUID.
Payload details
id: Required feedback UUID passed as the route parameter (/api/v1/feedbacks/{id}).- Request body: None (
additionalProperties: falseinschema.json).
Using this example
Returns 204 No Content, deletes the feedback record from Rating API, and publishes FeedbackDeletedIntegrationEvent so Catalog API recalculates the book’s rating summary.
using BookWorm.Chassis.Utilities.Configurations;using BookWorm.Constants.Aspire;using Refit;
public interface IRatingApiClient{ [Delete("/api/v1/feedbacks/{id}")] Task DeleteFeedbackAsync(Guid id, CancellationToken cancellationToken = default);}
// DI registration following BookWorm.Chassis Refit patternbuilder.Services .AddRefitGeneratedClient<IRatingApiClient>(settings, Services.Rating) .ConfigureHttpClient(client => client.BaseAddress = new($"https+http://{Services.Rating}")) .ConfigurePrimaryHttpMessageHandler(() => new SocketsHttpHandler { PooledConnectionLifetime = TimeSpan.FromMinutes(5) } );
// Typed invocationawait ratingApiClient.DeleteFeedbackAsync( Guid.Parse("01960a1b-5e6f-7a01-8a9b-0c1d2e3f4c01"), cancellationToken);import ratingApiClient from "@workspace/api-client/rating/feedbacks";import useDeleteFeedback from "@workspace/api-hooks/rating/useDeleteFeedback";
const feedbackId = "01960a1b-5e6f-7a01-8a9b-0c1d2e3f4c01";
// 1. Direct @workspace/api-client (Axios) callawait ratingApiClient.delete(feedbackId);
// 2. React / TanStack Query hook (@workspace/api-hooks)const { mutate: deleteFeedback, isPending } = useDeleteFeedback({ onSuccess: () => { console.log(`Deleted feedback ${feedbackId}`); },});
deleteFeedback(feedbackId);1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "title": "DeleteFeedbackRequest",
4 "description": "The feedback UUID is supplied as the id path parameter; the operation has no request body.",
5 "type": "object",
6 "additionalProperties": false
7}
8