Skip to content

Commit 842ca3d

Browse files
authored
Fix warning when building because of the missing documentation (#15543)
1 parent 63ac3e1 commit 842ca3d

File tree

9 files changed

+81
-54
lines changed

9 files changed

+81
-54
lines changed

modules/openapi-generator/src/main/resources/aspnetcore/3.0/Formatters/InputFormatterStream.mustache

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@ using Microsoft.AspNetCore.Mvc.Formatters;
55

66
namespace {{packageName}}.Formatters
77
{
8-
// Input Type Formatter to allow model binding to Streams
8+
/// <inheritdoc />
99
public class InputFormatterStream : InputFormatter
1010
{
11+
/// <inheritdoc />
1112
public InputFormatterStream()
1213
{
1314
SupportedMediaTypes.Add("application/octet-stream");
1415
SupportedMediaTypes.Add("image/jpeg");
1516
}
1617

18+
/// <inheritdoc />
19+
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
20+
{
21+
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
22+
}
23+
24+
/// <inheritdoc />
1725
protected override bool CanReadType(Type type)
1826
{
1927
if (type == typeof(Stream))
@@ -23,10 +31,5 @@ namespace {{packageName}}.Formatters
2331

2432
return false;
2533
}
26-
27-
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
28-
{
29-
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
30-
}
3134
}
3235
}

samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55

66
namespace Org.OpenAPITools.Formatters
77
{
8-
// Input Type Formatter to allow model binding to Streams
8+
/// <inheritdoc />
99
public class InputFormatterStream : InputFormatter
1010
{
11+
/// <inheritdoc />
1112
public InputFormatterStream()
1213
{
1314
SupportedMediaTypes.Add("application/octet-stream");
1415
SupportedMediaTypes.Add("image/jpeg");
1516
}
1617

18+
/// <inheritdoc />
19+
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
20+
{
21+
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
22+
}
23+
24+
/// <inheritdoc />
1725
protected override bool CanReadType(Type type)
1826
{
1927
if (type == typeof(Stream))
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
2331

2432
return false;
2533
}
26-
27-
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
28-
{
29-
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
30-
}
3134
}
3235
}

samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55

66
namespace Org.OpenAPITools.Formatters
77
{
8-
// Input Type Formatter to allow model binding to Streams
8+
/// <inheritdoc />
99
public class InputFormatterStream : InputFormatter
1010
{
11+
/// <inheritdoc />
1112
public InputFormatterStream()
1213
{
1314
SupportedMediaTypes.Add("application/octet-stream");
1415
SupportedMediaTypes.Add("image/jpeg");
1516
}
1617

18+
/// <inheritdoc />
19+
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
20+
{
21+
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
22+
}
23+
24+
/// <inheritdoc />
1725
protected override bool CanReadType(Type type)
1826
{
1927
if (type == typeof(Stream))
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
2331

2432
return false;
2533
}
26-
27-
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
28-
{
29-
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
30-
}
3134
}
3235
}

samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55

66
namespace Org.OpenAPITools.Formatters
77
{
8-
// Input Type Formatter to allow model binding to Streams
8+
/// <inheritdoc />
99
public class InputFormatterStream : InputFormatter
1010
{
11+
/// <inheritdoc />
1112
public InputFormatterStream()
1213
{
1314
SupportedMediaTypes.Add("application/octet-stream");
1415
SupportedMediaTypes.Add("image/jpeg");
1516
}
1617

18+
/// <inheritdoc />
19+
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
20+
{
21+
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
22+
}
23+
24+
/// <inheritdoc />
1725
protected override bool CanReadType(Type type)
1826
{
1927
if (type == typeof(Stream))
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
2331

2432
return false;
2533
}
26-
27-
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
28-
{
29-
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
30-
}
3134
}
3235
}

samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55

66
namespace Org.OpenAPITools.Formatters
77
{
8-
// Input Type Formatter to allow model binding to Streams
8+
/// <inheritdoc />
99
public class InputFormatterStream : InputFormatter
1010
{
11+
/// <inheritdoc />
1112
public InputFormatterStream()
1213
{
1314
SupportedMediaTypes.Add("application/octet-stream");
1415
SupportedMediaTypes.Add("image/jpeg");
1516
}
1617

18+
/// <inheritdoc />
19+
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
20+
{
21+
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
22+
}
23+
24+
/// <inheritdoc />
1725
protected override bool CanReadType(Type type)
1826
{
1927
if (type == typeof(Stream))
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
2331

2432
return false;
2533
}
26-
27-
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
28-
{
29-
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
30-
}
3134
}
3235
}

samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55

66
namespace Org.OpenAPITools.Formatters
77
{
8-
// Input Type Formatter to allow model binding to Streams
8+
/// <inheritdoc />
99
public class InputFormatterStream : InputFormatter
1010
{
11+
/// <inheritdoc />
1112
public InputFormatterStream()
1213
{
1314
SupportedMediaTypes.Add("application/octet-stream");
1415
SupportedMediaTypes.Add("image/jpeg");
1516
}
1617

18+
/// <inheritdoc />
19+
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
20+
{
21+
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
22+
}
23+
24+
/// <inheritdoc />
1725
protected override bool CanReadType(Type type)
1826
{
1927
if (type == typeof(Stream))
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
2331

2432
return false;
2533
}
26-
27-
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
28-
{
29-
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
30-
}
3134
}
3235
}

samples/server/petstore/aspnetcore-6.0-useNewtonsoft/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55

66
namespace Org.OpenAPITools.Formatters
77
{
8-
// Input Type Formatter to allow model binding to Streams
8+
/// <inheritdoc />
99
public class InputFormatterStream : InputFormatter
1010
{
11+
/// <inheritdoc />
1112
public InputFormatterStream()
1213
{
1314
SupportedMediaTypes.Add("application/octet-stream");
1415
SupportedMediaTypes.Add("image/jpeg");
1516
}
1617

18+
/// <inheritdoc />
19+
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
20+
{
21+
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
22+
}
23+
24+
/// <inheritdoc />
1725
protected override bool CanReadType(Type type)
1826
{
1927
if (type == typeof(Stream))
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
2331

2432
return false;
2533
}
26-
27-
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
28-
{
29-
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
30-
}
3134
}
3235
}

samples/server/petstore/aspnetcore-6.0-useSwashBuckle/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55

66
namespace Org.OpenAPITools.Formatters
77
{
8-
// Input Type Formatter to allow model binding to Streams
8+
/// <inheritdoc />
99
public class InputFormatterStream : InputFormatter
1010
{
11+
/// <inheritdoc />
1112
public InputFormatterStream()
1213
{
1314
SupportedMediaTypes.Add("application/octet-stream");
1415
SupportedMediaTypes.Add("image/jpeg");
1516
}
1617

18+
/// <inheritdoc />
19+
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
20+
{
21+
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
22+
}
23+
24+
/// <inheritdoc />
1725
protected override bool CanReadType(Type type)
1826
{
1927
if (type == typeof(Stream))
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
2331

2432
return false;
2533
}
26-
27-
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
28-
{
29-
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
30-
}
3134
}
3235
}

samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55

66
namespace Org.OpenAPITools.Formatters
77
{
8-
// Input Type Formatter to allow model binding to Streams
8+
/// <inheritdoc />
99
public class InputFormatterStream : InputFormatter
1010
{
11+
/// <inheritdoc />
1112
public InputFormatterStream()
1213
{
1314
SupportedMediaTypes.Add("application/octet-stream");
1415
SupportedMediaTypes.Add("image/jpeg");
1516
}
1617

18+
/// <inheritdoc />
19+
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
20+
{
21+
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
22+
}
23+
24+
/// <inheritdoc />
1725
protected override bool CanReadType(Type type)
1826
{
1927
if (type == typeof(Stream))
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
2331

2432
return false;
2533
}
26-
27-
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
28-
{
29-
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
30-
}
3134
}
3235
}

0 commit comments

Comments
 (0)