From fcf057a01992ffaf5e3651817f5e8366a0bf3cd6 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 21 Jun 2023 08:00:04 +0300 Subject: [PATCH] Remove not implemented endpoints from API docs --- src/Readarr.Api.V1/Health/HealthController.cs | 5 +++++ src/Readarr.Api.V1/Indexers/ReleaseModuleBase.cs | 5 +++++ src/Readarr.Api.V1/Queue/QueueController.cs | 5 +++++ src/Readarr.Api.V1/Queue/QueueDetailsController.cs | 5 +++++ src/Readarr.Api.V1/Queue/QueueStatusController.cs | 5 +++++ src/Readarr.Http/REST/RestController.cs | 3 ++- 6 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/Readarr.Api.V1/Health/HealthController.cs b/src/Readarr.Api.V1/Health/HealthController.cs index f8b7bb31f..f99ccab07 100644 --- a/src/Readarr.Api.V1/Health/HealthController.cs +++ b/src/Readarr.Api.V1/Health/HealthController.cs @@ -23,6 +23,11 @@ namespace Readarr.Api.V1.Health } [NonAction] + public override ActionResult GetResourceByIdWithErrorHandler(int id) + { + return base.GetResourceByIdWithErrorHandler(id); + } + protected override HealthResource GetResourceById(int id) { throw new NotImplementedException(); diff --git a/src/Readarr.Api.V1/Indexers/ReleaseModuleBase.cs b/src/Readarr.Api.V1/Indexers/ReleaseModuleBase.cs index 0d0586c9c..4fd80c8e4 100644 --- a/src/Readarr.Api.V1/Indexers/ReleaseModuleBase.cs +++ b/src/Readarr.Api.V1/Indexers/ReleaseModuleBase.cs @@ -9,6 +9,11 @@ namespace Readarr.Api.V1.Indexers public abstract class ReleaseControllerBase : RestController { [NonAction] + public override ActionResult GetResourceByIdWithErrorHandler(int id) + { + return base.GetResourceByIdWithErrorHandler(id); + } + protected override ReleaseResource GetResourceById(int id) { throw new NotImplementedException(); diff --git a/src/Readarr.Api.V1/Queue/QueueController.cs b/src/Readarr.Api.V1/Queue/QueueController.cs index d1378f310..02416e568 100644 --- a/src/Readarr.Api.V1/Queue/QueueController.cs +++ b/src/Readarr.Api.V1/Queue/QueueController.cs @@ -58,6 +58,11 @@ namespace Readarr.Api.V1.Queue } [NonAction] + public override ActionResult GetResourceByIdWithErrorHandler(int id) + { + return base.GetResourceByIdWithErrorHandler(id); + } + protected override QueueResource GetResourceById(int id) { throw new NotImplementedException(); diff --git a/src/Readarr.Api.V1/Queue/QueueDetailsController.cs b/src/Readarr.Api.V1/Queue/QueueDetailsController.cs index d4205a5cc..acc7a7596 100644 --- a/src/Readarr.Api.V1/Queue/QueueDetailsController.cs +++ b/src/Readarr.Api.V1/Queue/QueueDetailsController.cs @@ -27,6 +27,11 @@ namespace Readarr.Api.V1.Queue } [NonAction] + public override ActionResult GetResourceByIdWithErrorHandler(int id) + { + return base.GetResourceByIdWithErrorHandler(id); + } + protected override QueueResource GetResourceById(int id) { throw new NotImplementedException(); diff --git a/src/Readarr.Api.V1/Queue/QueueStatusController.cs b/src/Readarr.Api.V1/Queue/QueueStatusController.cs index b06da380f..6576e020f 100644 --- a/src/Readarr.Api.V1/Queue/QueueStatusController.cs +++ b/src/Readarr.Api.V1/Queue/QueueStatusController.cs @@ -31,6 +31,11 @@ namespace Readarr.Api.V1.Queue } [NonAction] + public override ActionResult GetResourceByIdWithErrorHandler(int id) + { + return base.GetResourceByIdWithErrorHandler(id); + } + protected override QueueStatusResource GetResourceById(int id) { throw new NotImplementedException(); diff --git a/src/Readarr.Http/REST/RestController.cs b/src/Readarr.Http/REST/RestController.cs index 9bef16d46..331ace8c7 100644 --- a/src/Readarr.Http/REST/RestController.cs +++ b/src/Readarr.Http/REST/RestController.cs @@ -39,7 +39,8 @@ namespace Readarr.Http.REST } [RestGetById] - public ActionResult GetResourceByIdWithErrorHandler(int id) + [Produces("application/json")] + public virtual ActionResult GetResourceByIdWithErrorHandler(int id) { try {