From ed6c75f60f03aa3485a51e056b915a586fbbbd3a Mon Sep 17 00:00:00 2001 From: Vitali Bibikov Date: Thu, 2 May 2024 14:04:26 +0200 Subject: [PATCH] Hidden assemblies --- ...ureFunctions.Extensions.Swashbuckle.csproj | 22 +++++++++++++------ .../TestFunction/TestController.cs | 12 +++++----- .../TestFunction/TestFunction.csproj | 9 ++++++++ 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/src/AzureFunctions.Extensions.Swashbuckle/AzureFunctions.Extensions.Swashbuckle/AzureFunctions.Extensions.Swashbuckle.csproj b/src/AzureFunctions.Extensions.Swashbuckle/AzureFunctions.Extensions.Swashbuckle/AzureFunctions.Extensions.Swashbuckle.csproj index caa31d6..c7c26d8 100644 --- a/src/AzureFunctions.Extensions.Swashbuckle/AzureFunctions.Extensions.Swashbuckle/AzureFunctions.Extensions.Swashbuckle.csproj +++ b/src/AzureFunctions.Extensions.Swashbuckle/AzureFunctions.Extensions.Swashbuckle/AzureFunctions.Extensions.Swashbuckle.csproj @@ -40,13 +40,21 @@ - - - - - - - + + all + + + all + + + all + + + all + + + all + all diff --git a/src/AzureFunctions.Extensions.Swashbuckle/TestFunction/TestController.cs b/src/AzureFunctions.Extensions.Swashbuckle/TestFunction/TestController.cs index fff7904..a54e2e3 100644 --- a/src/AzureFunctions.Extensions.Swashbuckle/TestFunction/TestController.cs +++ b/src/AzureFunctions.Extensions.Swashbuckle/TestFunction/TestController.cs @@ -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 @@ -113,12 +113,10 @@ public async Task RequestBodyTypePresented( { if (httpRequest.Method.Equals("post", StringComparison.OrdinalIgnoreCase)) { - using (var reader = new StreamReader(httpRequest.Body)) - { - var json = await reader.ReadToEndAsync(); - var testModel = JsonConvert.DeserializeObject(json); - return new CreatedResult("", testModel); - } + using var reader = new StreamReader(httpRequest.Body); + var json = await reader.ReadToEndAsync(); + var testModel = JsonSerializer.Deserialize(json); + return new CreatedResult("", testModel); } return new OkResult(); diff --git a/src/AzureFunctions.Extensions.Swashbuckle/TestFunction/TestFunction.csproj b/src/AzureFunctions.Extensions.Swashbuckle/TestFunction/TestFunction.csproj index 134614b..723a221 100644 --- a/src/AzureFunctions.Extensions.Swashbuckle/TestFunction/TestFunction.csproj +++ b/src/AzureFunctions.Extensions.Swashbuckle/TestFunction/TestFunction.csproj @@ -17,6 +17,15 @@ + + + + + + + + +