Delete authorv1.0.0 · JSON Schema
Deletes an existing author from the Catalog.
1. Delete an Author by UUID
A backoffice catalog manager removes an unused author record (DELETE /api/v1/authors/{id}).
Payload details
id: Required author UUID passed as the route parameter.- Request body: None.
Using this example
Returns 204 No Content and removes the author record from Catalog API.
using BookWorm.Chassis.Utilities.Configurations;using BookWorm.Constants.Aspire;using Refit;
public interface ICatalogApiClient{ [Delete("/api/v1/authors/{id}")] Task DeleteAuthorAsync(Guid id, CancellationToken cancellationToken = default);}
// DI registration following BookWorm.Chassis Refit patternbuilder.Services .AddRefitGeneratedClient<ICatalogApiClient>(settings, Services.Catalog) .ConfigureHttpClient(client => client.BaseAddress = new($"https+http://{Services.Catalog}")) .ConfigurePrimaryHttpMessageHandler(() => new SocketsHttpHandler { PooledConnectionLifetime = TimeSpan.FromMinutes(5) } );
// Typed invocationawait catalogApiClient.DeleteAuthorAsync( Guid.Parse("01960a1b-3000-7000-8a9b-0c1d2e3f4a03"), cancellationToken);import authorsApiClient from "@workspace/api-client/catalog/authors";import useDeleteAuthor from "@workspace/api-hooks/catalog/authors/useDeleteAuthor";
const authorId = "01960a1b-3000-7000-8a9b-0c1d2e3f4a03";
// 1. Direct @workspace/api-client (Axios) callawait authorsApiClient.delete(authorId);
// 2. React / TanStack Query hook (@workspace/api-hooks)const { mutate: deleteAuthor, isPending } = useDeleteAuthor({ onSuccess: () => { console.log(`Deleted author ${authorId}`); },});
deleteAuthor(authorId);1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "title": "DeleteAuthor",
4 "description": "Path identifier for the author to delete.",
5 "type": "string",
6 "format": "uuid"
7}
8