From 194926c7dd3f11c53f78a8208049008f04770ef6 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 10 Jun 2024 11:23:33 +0300 Subject: [PATCH] Ignore `Grabbed` from API docs Run application in docs.sh specific to platform (cherry picked from commit c331c8bd119fa9f85a53e96db04f541b2d90bbd3) Closes #10082 --- docs.sh | 10 ++++++++-- src/NzbDrone.Host/Radarr.Host.csproj | 2 +- src/Radarr.Api.V3/Movies/MovieResource.cs | 2 ++ src/Radarr.Api.V3/Radarr.Api.V3.csproj | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs.sh b/docs.sh index 606af8e9e..f26c1bcdc 100644 --- a/docs.sh +++ b/docs.sh @@ -21,15 +21,21 @@ slnFile=src/Radarr.sln platform=Posix +if [ "$PLATFORM" = "Windows" ]; then + application=Radarr.Console.dll +else + application=Radarr.dll +fi + dotnet clean $slnFile -c Debug dotnet clean $slnFile -c Release dotnet msbuild -restore $slnFile -p:Configuration=Debug -p:Platform=$platform -p:RuntimeIdentifiers=$RUNTIME -t:PublishAllRids dotnet new tool-manifest -dotnet tool install --version 6.5.0 Swashbuckle.AspNetCore.Cli +dotnet tool install --version 6.6.2 Swashbuckle.AspNetCore.Cli -dotnet tool run swagger tofile --output ./src/Radarr.Api.V3/openapi.json "$outputFolder/net6.0/$RUNTIME/radarr.console.dll" v3 & +dotnet tool run swagger tofile --output ./src/Radarr.Api.V3/openapi.json "$outputFolder/net6.0/$RUNTIME/$application" v3 & sleep 45 diff --git a/src/NzbDrone.Host/Radarr.Host.csproj b/src/NzbDrone.Host/Radarr.Host.csproj index 3de6409e6..ec63aa3ba 100644 --- a/src/NzbDrone.Host/Radarr.Host.csproj +++ b/src/NzbDrone.Host/Radarr.Host.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/Radarr.Api.V3/Movies/MovieResource.cs b/src/Radarr.Api.V3/Movies/MovieResource.cs index d3eca86a8..14b983bab 100644 --- a/src/Radarr.Api.V3/Movies/MovieResource.cs +++ b/src/Radarr.Api.V3/Movies/MovieResource.cs @@ -12,6 +12,7 @@ using NzbDrone.Core.Movies.Translations; using NzbDrone.Core.Parser; using Radarr.Api.V3.MovieFiles; using Radarr.Http.REST; +using Swashbuckle.AspNetCore.Annotations; namespace Radarr.Api.V3.Movies { @@ -85,6 +86,7 @@ namespace Radarr.Api.V3.Movies // Hiding this so people don't think its usable (only used to set the initial state) [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] + [SwaggerIgnore] public bool Grabbed { get; set; } } diff --git a/src/Radarr.Api.V3/Radarr.Api.V3.csproj b/src/Radarr.Api.V3/Radarr.Api.V3.csproj index 929150ce8..b36008edb 100644 --- a/src/Radarr.Api.V3/Radarr.Api.V3.csproj +++ b/src/Radarr.Api.V3/Radarr.Api.V3.csproj @@ -6,6 +6,7 @@ +