From 82d3b586f2dc5b0ffb77426340e82da74faac6bf Mon Sep 17 00:00:00 2001 From: Timothy Date: Tue, 7 Jul 2026 21:50:17 +0200 Subject: [PATCH] docs(api): describe library-browse parentId param in OpenAPI (#180 review) Co-Authored-By: Claude Fable 5 --- ErsatzTV/Controllers/Api/LibraryBrowseController.cs | 5 ++++- ErsatzTV/wwwroot/openapi/v1.json | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ErsatzTV/Controllers/Api/LibraryBrowseController.cs b/ErsatzTV/Controllers/Api/LibraryBrowseController.cs index 935144ca2..3dcb7f1d3 100644 --- a/ErsatzTV/Controllers/Api/LibraryBrowseController.cs +++ b/ErsatzTV/Controllers/Api/LibraryBrowseController.cs @@ -1,3 +1,4 @@ +using System.ComponentModel; using ErsatzTV.Application.LibraryBrowse; using ErsatzTV.Core.Api.LibraryBrowse; using MediatR; @@ -22,7 +23,9 @@ public class LibraryBrowseController(IMediator mediator) : ControllerBase [FromQuery] LibraryBrowseMediaType? mediaType = null, [FromQuery] int pageNum = 0, [FromQuery] int pageSize = 100, - [FromQuery] int? parentId = null, + [FromQuery] + [Description("Parent television show id; only used with mediaType=TelevisionSeason (lists that show's seasons), ignored otherwise")] + int? parentId = null, CancellationToken cancellationToken = default) { int clampedPageNum = Math.Max(0, pageNum); diff --git a/ErsatzTV/wwwroot/openapi/v1.json b/ErsatzTV/wwwroot/openapi/v1.json index 3f2495fe5..bbcaabb77 100644 --- a/ErsatzTV/wwwroot/openapi/v1.json +++ b/ErsatzTV/wwwroot/openapi/v1.json @@ -4972,6 +4972,7 @@ { "name": "parentId", "in": "query", + "description": "Parent television show id; only used with mediaType=TelevisionSeason (lists that show's seasons), ignored otherwise", "schema": { "type": "integer", "format": "int32"