From 842ca3db69c1a77b0f0eae4a8a27880e67bf9bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20C=C3=B4t=C3=A9?= Date: Tue, 16 May 2023 12:44:58 -0400 Subject: [PATCH] Fix warning when building because of the missing documentation (#15543) --- .../3.0/Formatters/InputFormatterStream.mustache | 15 +++++++++------ .../Formatters/InputFormatterStream.cs | 15 +++++++++------ .../Formatters/InputFormatterStream.cs | 15 +++++++++------ .../Formatters/InputFormatterStream.cs | 15 +++++++++------ .../Formatters/InputFormatterStream.cs | 15 +++++++++------ .../Formatters/InputFormatterStream.cs | 15 +++++++++------ .../Formatters/InputFormatterStream.cs | 15 +++++++++------ .../Formatters/InputFormatterStream.cs | 15 +++++++++------ .../Formatters/InputFormatterStream.cs | 15 +++++++++------ 9 files changed, 81 insertions(+), 54 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Formatters/InputFormatterStream.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Formatters/InputFormatterStream.mustache index e24d0a237a1..12c2b04f170 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Formatters/InputFormatterStream.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Formatters/InputFormatterStream.mustache @@ -5,15 +5,23 @@ using Microsoft.AspNetCore.Mvc.Formatters; namespace {{packageName}}.Formatters { - // Input Type Formatter to allow model binding to Streams + /// public class InputFormatterStream : InputFormatter { + /// public InputFormatterStream() { SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } + /// + public override Task ReadRequestBodyAsync(InputFormatterContext context) + { + return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); + } + + /// protected override bool CanReadType(Type type) { if (type == typeof(Stream)) @@ -23,10 +31,5 @@ namespace {{packageName}}.Formatters return false; } - - public override Task ReadRequestBodyAsync(InputFormatterContext context) - { - return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); - } } } \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index 9c437b1919a..8285e7d6a0b 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -5,15 +5,23 @@ using Microsoft.AspNetCore.Mvc.Formatters; namespace Org.OpenAPITools.Formatters { - // Input Type Formatter to allow model binding to Streams + /// public class InputFormatterStream : InputFormatter { + /// public InputFormatterStream() { SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } + /// + public override Task ReadRequestBodyAsync(InputFormatterContext context) + { + return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); + } + + /// protected override bool CanReadType(Type type) { if (type == typeof(Stream)) @@ -23,10 +31,5 @@ namespace Org.OpenAPITools.Formatters return false; } - - public override Task ReadRequestBodyAsync(InputFormatterContext context) - { - return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); - } } } \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index 9c437b1919a..8285e7d6a0b 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -5,15 +5,23 @@ using Microsoft.AspNetCore.Mvc.Formatters; namespace Org.OpenAPITools.Formatters { - // Input Type Formatter to allow model binding to Streams + /// public class InputFormatterStream : InputFormatter { + /// public InputFormatterStream() { SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } + /// + public override Task ReadRequestBodyAsync(InputFormatterContext context) + { + return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); + } + + /// protected override bool CanReadType(Type type) { if (type == typeof(Stream)) @@ -23,10 +31,5 @@ namespace Org.OpenAPITools.Formatters return false; } - - public override Task ReadRequestBodyAsync(InputFormatterContext context) - { - return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); - } } } \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index 9c437b1919a..8285e7d6a0b 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -5,15 +5,23 @@ using Microsoft.AspNetCore.Mvc.Formatters; namespace Org.OpenAPITools.Formatters { - // Input Type Formatter to allow model binding to Streams + /// public class InputFormatterStream : InputFormatter { + /// public InputFormatterStream() { SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } + /// + public override Task ReadRequestBodyAsync(InputFormatterContext context) + { + return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); + } + + /// protected override bool CanReadType(Type type) { if (type == typeof(Stream)) @@ -23,10 +31,5 @@ namespace Org.OpenAPITools.Formatters return false; } - - public override Task ReadRequestBodyAsync(InputFormatterContext context) - { - return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); - } } } \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index 9c437b1919a..8285e7d6a0b 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -5,15 +5,23 @@ using Microsoft.AspNetCore.Mvc.Formatters; namespace Org.OpenAPITools.Formatters { - // Input Type Formatter to allow model binding to Streams + /// public class InputFormatterStream : InputFormatter { + /// public InputFormatterStream() { SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } + /// + public override Task ReadRequestBodyAsync(InputFormatterContext context) + { + return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); + } + + /// protected override bool CanReadType(Type type) { if (type == typeof(Stream)) @@ -23,10 +31,5 @@ namespace Org.OpenAPITools.Formatters return false; } - - public override Task ReadRequestBodyAsync(InputFormatterContext context) - { - return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); - } } } \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index 9c437b1919a..8285e7d6a0b 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -5,15 +5,23 @@ using Microsoft.AspNetCore.Mvc.Formatters; namespace Org.OpenAPITools.Formatters { - // Input Type Formatter to allow model binding to Streams + /// public class InputFormatterStream : InputFormatter { + /// public InputFormatterStream() { SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } + /// + public override Task ReadRequestBodyAsync(InputFormatterContext context) + { + return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); + } + + /// protected override bool CanReadType(Type type) { if (type == typeof(Stream)) @@ -23,10 +31,5 @@ namespace Org.OpenAPITools.Formatters return false; } - - public override Task ReadRequestBodyAsync(InputFormatterContext context) - { - return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); - } } } \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-6.0-useNewtonsoft/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-6.0-useNewtonsoft/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index 9c437b1919a..8285e7d6a0b 100644 --- a/samples/server/petstore/aspnetcore-6.0-useNewtonsoft/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-6.0-useNewtonsoft/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -5,15 +5,23 @@ using Microsoft.AspNetCore.Mvc.Formatters; namespace Org.OpenAPITools.Formatters { - // Input Type Formatter to allow model binding to Streams + /// public class InputFormatterStream : InputFormatter { + /// public InputFormatterStream() { SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } + /// + public override Task ReadRequestBodyAsync(InputFormatterContext context) + { + return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); + } + + /// protected override bool CanReadType(Type type) { if (type == typeof(Stream)) @@ -23,10 +31,5 @@ namespace Org.OpenAPITools.Formatters return false; } - - public override Task ReadRequestBodyAsync(InputFormatterContext context) - { - return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); - } } } \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index 9c437b1919a..8285e7d6a0b 100644 --- a/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -5,15 +5,23 @@ using Microsoft.AspNetCore.Mvc.Formatters; namespace Org.OpenAPITools.Formatters { - // Input Type Formatter to allow model binding to Streams + /// public class InputFormatterStream : InputFormatter { + /// public InputFormatterStream() { SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } + /// + public override Task ReadRequestBodyAsync(InputFormatterContext context) + { + return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); + } + + /// protected override bool CanReadType(Type type) { if (type == typeof(Stream)) @@ -23,10 +31,5 @@ namespace Org.OpenAPITools.Formatters return false; } - - public override Task ReadRequestBodyAsync(InputFormatterContext context) - { - return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); - } } } \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index 9c437b1919a..8285e7d6a0b 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -5,15 +5,23 @@ using Microsoft.AspNetCore.Mvc.Formatters; namespace Org.OpenAPITools.Formatters { - // Input Type Formatter to allow model binding to Streams + /// public class InputFormatterStream : InputFormatter { + /// public InputFormatterStream() { SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } + /// + public override Task ReadRequestBodyAsync(InputFormatterContext context) + { + return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); + } + + /// protected override bool CanReadType(Type type) { if (type == typeof(Stream)) @@ -23,10 +31,5 @@ namespace Org.OpenAPITools.Formatters return false; } - - public override Task ReadRequestBodyAsync(InputFormatterContext context) - { - return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body); - } } } \ No newline at end of file