File tree Expand file tree Collapse file tree 9 files changed +81
-54
lines changed
modules/openapi-generator/src/main/resources/aspnetcore/3.0/Formatters
aspnetcore-3.0/src/Org.OpenAPITools/Formatters
aspnetcore-3.1/src/Org.OpenAPITools/Formatters
aspnetcore-5.0/src/Org.OpenAPITools/Formatters
aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Formatters
aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Formatters
aspnetcore-6.0-useNewtonsoft/src/Org.OpenAPITools/Formatters
aspnetcore-6.0-useSwashBuckle/src/Org.OpenAPITools/Formatters
aspnetcore-6.0/src/Org.OpenAPITools/Formatters Expand file tree Collapse file tree 9 files changed +81
-54
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,23 @@ using Microsoft.AspNetCore.Mvc.Formatters;
5
5
6
6
namespace { {packageName} }.Formatters
7
7
{
8
- // Input Type Formatter to allow model binding to Streams
8
+ /// < inheritdoc / >
9
9
public class InputFormatterStream : InputFormatter
10
10
{
11
+ /// < inheritdoc />
11
12
public InputFormatterStream()
12
13
{
13
14
SupportedMediaTypes.Add(" application/octet-stream" );
14
15
SupportedMediaTypes.Add(" image/jpeg" );
15
16
}
16
17
18
+ /// <inheritdoc />
19
+ public override Task<InputFormatterResult > ReadRequestBodyAsync(InputFormatterContext context)
20
+ {
21
+ return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
22
+ }
23
+
24
+ /// <inheritdoc />
17
25
protected override bool CanReadType(Type type)
18
26
{
19
27
if (type == typeof(Stream))
@@ -23,10 +31,5 @@ namespace {{packageName}}.Formatters
23
31
24
32
return false;
25
33
}
26
-
27
- public override Task<InputFormatterResult > ReadRequestBodyAsync(InputFormatterContext context)
28
- {
29
- return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
30
- }
31
34
}
32
35
}
Original file line number Diff line number Diff line change 5
5
6
6
namespace Org . OpenAPITools . Formatters
7
7
{
8
- // Input Type Formatter to allow model binding to Streams
8
+ /// <inheritdoc />
9
9
public class InputFormatterStream : InputFormatter
10
10
{
11
+ /// <inheritdoc />
11
12
public InputFormatterStream ( )
12
13
{
13
14
SupportedMediaTypes . Add ( "application/octet-stream" ) ;
14
15
SupportedMediaTypes . Add ( "image/jpeg" ) ;
15
16
}
16
17
18
+ /// <inheritdoc />
19
+ public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
20
+ {
21
+ return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
22
+ }
23
+
24
+ /// <inheritdoc />
17
25
protected override bool CanReadType ( Type type )
18
26
{
19
27
if ( type == typeof ( Stream ) )
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
23
31
24
32
return false ;
25
33
}
26
-
27
- public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
28
- {
29
- return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
30
- }
31
34
}
32
35
}
Original file line number Diff line number Diff line change 5
5
6
6
namespace Org . OpenAPITools . Formatters
7
7
{
8
- // Input Type Formatter to allow model binding to Streams
8
+ /// <inheritdoc />
9
9
public class InputFormatterStream : InputFormatter
10
10
{
11
+ /// <inheritdoc />
11
12
public InputFormatterStream ( )
12
13
{
13
14
SupportedMediaTypes . Add ( "application/octet-stream" ) ;
14
15
SupportedMediaTypes . Add ( "image/jpeg" ) ;
15
16
}
16
17
18
+ /// <inheritdoc />
19
+ public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
20
+ {
21
+ return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
22
+ }
23
+
24
+ /// <inheritdoc />
17
25
protected override bool CanReadType ( Type type )
18
26
{
19
27
if ( type == typeof ( Stream ) )
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
23
31
24
32
return false ;
25
33
}
26
-
27
- public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
28
- {
29
- return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
30
- }
31
34
}
32
35
}
Original file line number Diff line number Diff line change 5
5
6
6
namespace Org . OpenAPITools . Formatters
7
7
{
8
- // Input Type Formatter to allow model binding to Streams
8
+ /// <inheritdoc />
9
9
public class InputFormatterStream : InputFormatter
10
10
{
11
+ /// <inheritdoc />
11
12
public InputFormatterStream ( )
12
13
{
13
14
SupportedMediaTypes . Add ( "application/octet-stream" ) ;
14
15
SupportedMediaTypes . Add ( "image/jpeg" ) ;
15
16
}
16
17
18
+ /// <inheritdoc />
19
+ public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
20
+ {
21
+ return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
22
+ }
23
+
24
+ /// <inheritdoc />
17
25
protected override bool CanReadType ( Type type )
18
26
{
19
27
if ( type == typeof ( Stream ) )
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
23
31
24
32
return false ;
25
33
}
26
-
27
- public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
28
- {
29
- return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
30
- }
31
34
}
32
35
}
Original file line number Diff line number Diff line change 5
5
6
6
namespace Org . OpenAPITools . Formatters
7
7
{
8
- // Input Type Formatter to allow model binding to Streams
8
+ /// <inheritdoc />
9
9
public class InputFormatterStream : InputFormatter
10
10
{
11
+ /// <inheritdoc />
11
12
public InputFormatterStream ( )
12
13
{
13
14
SupportedMediaTypes . Add ( "application/octet-stream" ) ;
14
15
SupportedMediaTypes . Add ( "image/jpeg" ) ;
15
16
}
16
17
18
+ /// <inheritdoc />
19
+ public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
20
+ {
21
+ return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
22
+ }
23
+
24
+ /// <inheritdoc />
17
25
protected override bool CanReadType ( Type type )
18
26
{
19
27
if ( type == typeof ( Stream ) )
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
23
31
24
32
return false ;
25
33
}
26
-
27
- public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
28
- {
29
- return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
30
- }
31
34
}
32
35
}
Original file line number Diff line number Diff line change 5
5
6
6
namespace Org . OpenAPITools . Formatters
7
7
{
8
- // Input Type Formatter to allow model binding to Streams
8
+ /// <inheritdoc />
9
9
public class InputFormatterStream : InputFormatter
10
10
{
11
+ /// <inheritdoc />
11
12
public InputFormatterStream ( )
12
13
{
13
14
SupportedMediaTypes . Add ( "application/octet-stream" ) ;
14
15
SupportedMediaTypes . Add ( "image/jpeg" ) ;
15
16
}
16
17
18
+ /// <inheritdoc />
19
+ public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
20
+ {
21
+ return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
22
+ }
23
+
24
+ /// <inheritdoc />
17
25
protected override bool CanReadType ( Type type )
18
26
{
19
27
if ( type == typeof ( Stream ) )
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
23
31
24
32
return false ;
25
33
}
26
-
27
- public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
28
- {
29
- return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
30
- }
31
34
}
32
35
}
Original file line number Diff line number Diff line change 5
5
6
6
namespace Org . OpenAPITools . Formatters
7
7
{
8
- // Input Type Formatter to allow model binding to Streams
8
+ /// <inheritdoc />
9
9
public class InputFormatterStream : InputFormatter
10
10
{
11
+ /// <inheritdoc />
11
12
public InputFormatterStream ( )
12
13
{
13
14
SupportedMediaTypes . Add ( "application/octet-stream" ) ;
14
15
SupportedMediaTypes . Add ( "image/jpeg" ) ;
15
16
}
16
17
18
+ /// <inheritdoc />
19
+ public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
20
+ {
21
+ return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
22
+ }
23
+
24
+ /// <inheritdoc />
17
25
protected override bool CanReadType ( Type type )
18
26
{
19
27
if ( type == typeof ( Stream ) )
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
23
31
24
32
return false ;
25
33
}
26
-
27
- public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
28
- {
29
- return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
30
- }
31
34
}
32
35
}
Original file line number Diff line number Diff line change 5
5
6
6
namespace Org . OpenAPITools . Formatters
7
7
{
8
- // Input Type Formatter to allow model binding to Streams
8
+ /// <inheritdoc />
9
9
public class InputFormatterStream : InputFormatter
10
10
{
11
+ /// <inheritdoc />
11
12
public InputFormatterStream ( )
12
13
{
13
14
SupportedMediaTypes . Add ( "application/octet-stream" ) ;
14
15
SupportedMediaTypes . Add ( "image/jpeg" ) ;
15
16
}
16
17
18
+ /// <inheritdoc />
19
+ public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
20
+ {
21
+ return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
22
+ }
23
+
24
+ /// <inheritdoc />
17
25
protected override bool CanReadType ( Type type )
18
26
{
19
27
if ( type == typeof ( Stream ) )
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
23
31
24
32
return false ;
25
33
}
26
-
27
- public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
28
- {
29
- return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
30
- }
31
34
}
32
35
}
Original file line number Diff line number Diff line change 5
5
6
6
namespace Org . OpenAPITools . Formatters
7
7
{
8
- // Input Type Formatter to allow model binding to Streams
8
+ /// <inheritdoc />
9
9
public class InputFormatterStream : InputFormatter
10
10
{
11
+ /// <inheritdoc />
11
12
public InputFormatterStream ( )
12
13
{
13
14
SupportedMediaTypes . Add ( "application/octet-stream" ) ;
14
15
SupportedMediaTypes . Add ( "image/jpeg" ) ;
15
16
}
16
17
18
+ /// <inheritdoc />
19
+ public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
20
+ {
21
+ return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
22
+ }
23
+
24
+ /// <inheritdoc />
17
25
protected override bool CanReadType ( Type type )
18
26
{
19
27
if ( type == typeof ( Stream ) )
@@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)
23
31
24
32
return false ;
25
33
}
26
-
27
- public override Task < InputFormatterResult > ReadRequestBodyAsync ( InputFormatterContext context )
28
- {
29
- return InputFormatterResult . SuccessAsync ( context . HttpContext . Request . Body ) ;
30
- }
31
34
}
32
35
}
You can’t perform that action at this time.
0 commit comments