Remove not implemented endpoints from API docs

This commit is contained in:
Bogdan 2023-05-30 21:20:39 +03:00 committed by Mark McDowall
parent 82919a8ed1
commit 0a05781aca
9 changed files with 44 additions and 360 deletions

View File

@ -22,6 +22,12 @@ namespace Sonarr.Api.V3.Health
_healthCheckService = healthCheckService; _healthCheckService = healthCheckService;
} }
[NonAction]
public override ActionResult<HealthResource> GetResourceByIdWithErrorHandler(int id)
{
return base.GetResourceByIdWithErrorHandler(id);
}
protected override HealthResource GetResourceById(int id) protected override HealthResource GetResourceById(int id)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using NzbDrone.Core.DecisionEngine; using NzbDrone.Core.DecisionEngine;
using NzbDrone.Core.Profiles.Qualities; using NzbDrone.Core.Profiles.Qualities;
using Sonarr.Http.REST; using Sonarr.Http.REST;
@ -15,6 +16,12 @@ namespace Sonarr.Api.V3.Indexers
_qualityProfile = qualityProfileService.GetDefaultProfile(string.Empty); _qualityProfile = qualityProfileService.GetDefaultProfile(string.Empty);
} }
[NonAction]
public override ActionResult<ReleaseResource> GetResourceByIdWithErrorHandler(int id)
{
return base.GetResourceByIdWithErrorHandler(id);
}
protected override ReleaseResource GetResourceById(int id) protected override ReleaseResource GetResourceById(int id)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -32,9 +32,15 @@ namespace Sonarr.Api.V3.Profiles.Languages
}; };
} }
[NonAction]
public override ActionResult<LanguageProfileResource> GetResourceByIdWithErrorHandler(int id)
{
return base.GetResourceByIdWithErrorHandler(id);
}
protected override LanguageProfileResource GetResourceById(int id) protected override LanguageProfileResource GetResourceById(int id)
{ {
throw new global::System.NotImplementedException(); throw new NotImplementedException();
} }
} }
} }

View File

@ -68,6 +68,7 @@ namespace Sonarr.Api.V3
[RestPostById] [RestPostById]
[Consumes("application/json")] [Consumes("application/json")]
[Produces("application/json")]
public ActionResult<TProviderResource> CreateProvider([FromBody] TProviderResource providerResource, [FromQuery] bool forceSave = false) public ActionResult<TProviderResource> CreateProvider([FromBody] TProviderResource providerResource, [FromQuery] bool forceSave = false)
{ {
var providerDefinition = GetDefinition(providerResource, true, !forceSave, false); var providerDefinition = GetDefinition(providerResource, true, !forceSave, false);
@ -84,6 +85,7 @@ namespace Sonarr.Api.V3
[RestPutById] [RestPutById]
[Consumes("application/json")] [Consumes("application/json")]
[Produces("application/json")]
public ActionResult<TProviderResource> UpdateProvider([FromBody] TProviderResource providerResource, [FromQuery] bool forceSave = false) public ActionResult<TProviderResource> UpdateProvider([FromBody] TProviderResource providerResource, [FromQuery] bool forceSave = false)
{ {
var providerDefinition = GetDefinition(providerResource, true, !forceSave, false); var providerDefinition = GetDefinition(providerResource, true, !forceSave, false);
@ -101,6 +103,7 @@ namespace Sonarr.Api.V3
[HttpPut("bulk")] [HttpPut("bulk")]
[Consumes("application/json")] [Consumes("application/json")]
[Produces("application/json")]
public ActionResult<TProviderResource> UpdateProvider([FromBody] TBulkProviderResource providerResource) public ActionResult<TProviderResource> UpdateProvider([FromBody] TBulkProviderResource providerResource)
{ {
var definitionsToUpdate = _providerFactory.Get(providerResource.Ids).ToList(); var definitionsToUpdate = _providerFactory.Get(providerResource.Ids).ToList();
@ -198,6 +201,7 @@ namespace Sonarr.Api.V3
} }
[HttpPost("testall")] [HttpPost("testall")]
[Produces("application/json")]
public IActionResult TestAll() public IActionResult TestAll()
{ {
var providerDefinitions = _providerFactory.All() var providerDefinitions = _providerFactory.All()
@ -225,6 +229,7 @@ namespace Sonarr.Api.V3
[SkipValidation] [SkipValidation]
[HttpPost("action/{name}")] [HttpPost("action/{name}")]
[Consumes("application/json")] [Consumes("application/json")]
[Produces("application/json")]
public IActionResult RequestAction(string name, [FromBody] TProviderResource resource) public IActionResult RequestAction(string name, [FromBody] TProviderResource resource)
{ {
var providerDefinition = GetDefinition(resource, false, false, false); var providerDefinition = GetDefinition(resource, false, false, false);

View File

@ -58,6 +58,12 @@ namespace Sonarr.Api.V3.Queue
_qualityComparer = new QualityModelComparer(qualityProfileService.GetDefaultProfile(string.Empty)); _qualityComparer = new QualityModelComparer(qualityProfileService.GetDefaultProfile(string.Empty));
} }
[NonAction]
public override ActionResult<QueueResource> GetResourceByIdWithErrorHandler(int id)
{
return base.GetResourceByIdWithErrorHandler(id);
}
protected override QueueResource GetResourceById(int id) protected override QueueResource GetResourceById(int id)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -26,6 +26,12 @@ namespace Sonarr.Api.V3.Queue
_pendingReleaseService = pendingReleaseService; _pendingReleaseService = pendingReleaseService;
} }
[NonAction]
public override ActionResult<QueueResource> GetResourceByIdWithErrorHandler(int id)
{
return base.GetResourceByIdWithErrorHandler(id);
}
protected override QueueResource GetResourceById(int id) protected override QueueResource GetResourceById(int id)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -30,6 +30,12 @@ namespace Sonarr.Api.V3.Queue
_broadcastDebounce = new Debouncer(BroadcastChange, TimeSpan.FromSeconds(5)); _broadcastDebounce = new Debouncer(BroadcastChange, TimeSpan.FromSeconds(5));
} }
[NonAction]
public override ActionResult<QueueStatusResource> GetResourceByIdWithErrorHandler(int id)
{
return base.GetResourceByIdWithErrorHandler(id);
}
protected override QueueStatusResource GetResourceById(int id) protected override QueueStatusResource GetResourceById(int id)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@ -1401,20 +1401,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/DownloadClientResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/DownloadClientResource" "$ref": "#/components/schemas/DownloadClientResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/DownloadClientResource"
}
} }
} }
} }
@ -1457,20 +1447,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/DownloadClientResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/DownloadClientResource" "$ref": "#/components/schemas/DownloadClientResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/DownloadClientResource"
}
} }
} }
} }
@ -1544,20 +1524,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/DownloadClientResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/DownloadClientResource" "$ref": "#/components/schemas/DownloadClientResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/DownloadClientResource"
}
} }
} }
} }
@ -2244,36 +2214,6 @@
} }
} }
}, },
"/api/v3/health/{id}": {
"get": {
"tags": [
"Health"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HealthResource"
}
}
}
}
}
}
},
"/api/v3/history": { "/api/v3/history": {
"get": { "get": {
"tags": [ "tags": [
@ -2613,20 +2553,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/ImportListResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/ImportListResource" "$ref": "#/components/schemas/ImportListResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/ImportListResource"
}
} }
} }
} }
@ -2669,20 +2599,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/ImportListResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/ImportListResource" "$ref": "#/components/schemas/ImportListResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/ImportListResource"
}
} }
} }
} }
@ -2756,20 +2676,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/ImportListResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/ImportListResource" "$ref": "#/components/schemas/ImportListResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/ImportListResource"
}
} }
} }
} }
@ -3084,20 +2994,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/IndexerResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/IndexerResource" "$ref": "#/components/schemas/IndexerResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/IndexerResource"
}
} }
} }
} }
@ -3140,20 +3040,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/IndexerResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/IndexerResource" "$ref": "#/components/schemas/IndexerResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/IndexerResource"
}
} }
} }
} }
@ -3227,20 +3117,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/IndexerResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/IndexerResource" "$ref": "#/components/schemas/IndexerResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/IndexerResource"
}
} }
} }
} }
@ -3686,36 +3566,6 @@
"deprecated": true "deprecated": true
} }
}, },
"/api/v3/languageprofile/schema/{id}": {
"get": {
"tags": [
"LanguageProfileSchema"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LanguageProfileResource"
}
}
}
}
}
}
},
"/api/v3/localization": { "/api/v3/localization": {
"get": { "get": {
"tags": [ "tags": [
@ -4107,20 +3957,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/MetadataResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/MetadataResource" "$ref": "#/components/schemas/MetadataResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/MetadataResource"
}
} }
} }
} }
@ -4163,20 +4003,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/MetadataResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/MetadataResource" "$ref": "#/components/schemas/MetadataResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/MetadataResource"
}
} }
} }
} }
@ -4250,20 +4080,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/MetadataResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/MetadataResource" "$ref": "#/components/schemas/MetadataResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/MetadataResource"
}
} }
} }
} }
@ -4748,20 +4568,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/NotificationResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/NotificationResource" "$ref": "#/components/schemas/NotificationResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/NotificationResource"
}
} }
} }
} }
@ -4804,20 +4614,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/NotificationResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/NotificationResource" "$ref": "#/components/schemas/NotificationResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/NotificationResource"
}
} }
} }
} }
@ -4891,20 +4691,10 @@
"200": { "200": {
"description": "Success", "description": "Success",
"content": { "content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/NotificationResource"
}
},
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/NotificationResource" "$ref": "#/components/schemas/NotificationResource"
} }
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/NotificationResource"
}
} }
} }
} }
@ -5455,34 +5245,6 @@
"description": "Success" "description": "Success"
} }
} }
},
"get": {
"tags": [
"Queue"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/QueueResource"
}
}
}
}
}
} }
}, },
"/api/v3/queue/bulk": { "/api/v3/queue/bulk": {
@ -5682,36 +5444,6 @@
} }
} }
}, },
"/api/v3/queue/details/{id}": {
"get": {
"tags": [
"QueueDetails"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/QueueResource"
}
}
}
}
}
}
},
"/api/v3/queue/status": { "/api/v3/queue/status": {
"get": { "get": {
"tags": [ "tags": [
@ -5731,36 +5463,6 @@
} }
} }
}, },
"/api/v3/queue/status/{id}": {
"get": {
"tags": [
"QueueStatus"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/QueueStatusResource"
}
}
}
}
}
}
},
"/api/v3/release": { "/api/v3/release": {
"post": { "post": {
"tags": [ "tags": [
@ -5828,36 +5530,6 @@
} }
} }
}, },
"/api/v3/release/{id}": {
"get": {
"tags": [
"Release"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReleaseResource"
}
}
}
}
}
}
},
"/api/v3/releaseprofile": { "/api/v3/releaseprofile": {
"post": { "post": {
"tags": [ "tags": [
@ -6096,36 +5768,6 @@
} }
} }
}, },
"/api/v3/release/push/{id}": {
"get": {
"tags": [
"ReleasePush"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReleaseResource"
}
}
}
}
}
}
},
"/api/v3/remotepathmapping": { "/api/v3/remotepathmapping": {
"post": { "post": {
"tags": [ "tags": [

View File

@ -48,7 +48,7 @@ namespace Sonarr.Http.REST
[RestGetById] [RestGetById]
[Produces("application/json")] [Produces("application/json")]
public ActionResult<TResource> GetResourceByIdWithErrorHandler(int id) public virtual ActionResult<TResource> GetResourceByIdWithErrorHandler(int id)
{ {
try try
{ {