Skip to content

Commit

Permalink
Hidden assemblies
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalybibikov committed May 2, 2024
1 parent 552a91a commit ed6c75f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,21 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.2.1" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="1.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Abstractions" Version="1.3.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.5.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.2.1">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Abstractions" Version="1.3.0" >
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" >
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.5.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.5.0" >
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Text.Json" Version="8.0.3">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
using AzureFunctions.Extensions.Swashbuckle.Attribute;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Functions.Worker;
using Newtonsoft.Json;
using TestFunction.Models;

namespace TestFunction
Expand Down Expand Up @@ -113,12 +113,10 @@ public async Task<IActionResult> RequestBodyTypePresented(
{
if (httpRequest.Method.Equals("post", StringComparison.OrdinalIgnoreCase))
{
using (var reader = new StreamReader(httpRequest.Body))
{
var json = await reader.ReadToEndAsync();
var testModel = JsonConvert.DeserializeObject<TestModel>(json);
return new CreatedResult("", testModel);
}
using var reader = new StreamReader(httpRequest.Body);
var json = await reader.ReadToEndAsync();
var testModel = JsonSerializer.Deserialize<TestModel>(json);
return new CreatedResult("", testModel);
}

return new OkResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="1.2.0" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" >
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.5.0">
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.5.0" >
</PackageReference>
</ItemGroup>

<ItemGroup>
<Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext" />
Expand Down

0 comments on commit ed6c75f

Please sign in to comment.