Ignore `Grabbed` from API docs

Run application in docs.sh specific to platform

(cherry picked from commit c331c8bd119fa9f85a53e96db04f541b2d90bbd3)

Closes #4847
pull/4837/head
Bogdan 3 months ago
parent 4832860cce
commit 9eda077c03

@ -21,15 +21,21 @@ slnFile=src/Lidarr.sln
platform=Posix platform=Posix
if [ "$PLATFORM" = "Windows" ]; then
application=Lidarr.Console.dll
else
application=Lidarr.dll
fi
dotnet clean $slnFile -c Debug dotnet clean $slnFile -c Debug
dotnet clean $slnFile -c Release dotnet clean $slnFile -c Release
dotnet msbuild -restore $slnFile -p:Configuration=Debug -p:Platform=$platform -p:RuntimeIdentifiers=$RUNTIME -t:PublishAllRids dotnet msbuild -restore $slnFile -p:Configuration=Debug -p:Platform=$platform -p:RuntimeIdentifiers=$RUNTIME -t:PublishAllRids
dotnet new tool-manifest 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/Lidarr.Api.V1/openapi.json "$outputFolder/net6.0/$RUNTIME/lidarr.console.dll" v1 & dotnet tool run swagger tofile --output ./src/Lidarr.Api.V1/openapi.json "$outputFolder/net6.0/$RUNTIME/$application" v1 &
sleep 45 sleep 45

@ -6,6 +6,7 @@ using Lidarr.Http.REST;
using Newtonsoft.Json; using Newtonsoft.Json;
using NzbDrone.Core.MediaCover; using NzbDrone.Core.MediaCover;
using NzbDrone.Core.Music; using NzbDrone.Core.Music;
using Swashbuckle.AspNetCore.Annotations;
namespace Lidarr.Api.V1.Albums namespace Lidarr.Api.V1.Albums
{ {
@ -49,6 +50,7 @@ namespace Lidarr.Api.V1.Albums
// Hiding this so people don't think its usable (only used to set the initial state) // Hiding this so people don't think its usable (only used to set the initial state)
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
[SwaggerIgnore]
public bool Grabbed { get; set; } public bool Grabbed { get; set; }
} }

@ -9,6 +9,7 @@
<ProjectReference Include="..\NzbDrone.SignalR\Lidarr.SignalR.csproj" /> <ProjectReference Include="..\NzbDrone.SignalR\Lidarr.SignalR.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.6.2" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" /> <PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
<PackageReference Include="FluentValidation" Version="9.5.4" /> <PackageReference Include="FluentValidation" Version="9.5.4" />
<PackageReference Include="Ical.Net" Version="4.2.0" /> <PackageReference Include="Ical.Net" Version="4.2.0" />

@ -5,6 +5,7 @@ using Lidarr.Api.V1.TrackFiles;
using Lidarr.Http.REST; using Lidarr.Http.REST;
using Newtonsoft.Json; using Newtonsoft.Json;
using NzbDrone.Core.Music; using NzbDrone.Core.Music;
using Swashbuckle.AspNetCore.Annotations;
namespace Lidarr.Api.V1.Tracks namespace Lidarr.Api.V1.Tracks
{ {
@ -29,6 +30,7 @@ namespace Lidarr.Api.V1.Tracks
// Hiding this so people don't think its usable (only used to set the initial state) // Hiding this so people don't think its usable (only used to set the initial state)
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
[SwaggerIgnore]
public bool Grabbed { get; set; } public bool Grabbed { get; set; }
} }

@ -6,7 +6,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" /> <PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.2" /> <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.2" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.5.0" /> <PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.6.2" />
<PackageReference Include="DryIoc.dll" Version="5.4.3" /> <PackageReference Include="DryIoc.dll" Version="5.4.3" />
<PackageReference Include="DryIoc.Microsoft.DependencyInjection" Version="6.2.0" /> <PackageReference Include="DryIoc.Microsoft.DependencyInjection" Version="6.2.0" />
</ItemGroup> </ItemGroup>

Loading…
Cancel
Save