Skip to content

Commit

Permalink
Fix warning when building because of the missing documentation (#15543)
Browse files Browse the repository at this point in the history
  • Loading branch information
JFCote committed May 16, 2023
1 parent 63ac3e1 commit 842ca3d
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@ using Microsoft.AspNetCore.Mvc.Formatters;

namespace {{packageName}}.Formatters
{
// Input Type Formatter to allow model binding to Streams
/// <inheritdoc />
public class InputFormatterStream : InputFormatter
{
/// <inheritdoc />
public InputFormatterStream()
{
SupportedMediaTypes.Add("application/octet-stream");
SupportedMediaTypes.Add("image/jpeg");
}

/// <inheritdoc />
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}

/// <inheritdoc />
protected override bool CanReadType(Type type)
{
if (type == typeof(Stream))
Expand All @@ -23,10 +31,5 @@ namespace {{packageName}}.Formatters

return false;
}

public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@

namespace Org.OpenAPITools.Formatters
{
// Input Type Formatter to allow model binding to Streams
/// <inheritdoc />
public class InputFormatterStream : InputFormatter
{
/// <inheritdoc />
public InputFormatterStream()
{
SupportedMediaTypes.Add("application/octet-stream");
SupportedMediaTypes.Add("image/jpeg");
}

/// <inheritdoc />
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}

/// <inheritdoc />
protected override bool CanReadType(Type type)
{
if (type == typeof(Stream))
Expand All @@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)

return false;
}

public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@

namespace Org.OpenAPITools.Formatters
{
// Input Type Formatter to allow model binding to Streams
/// <inheritdoc />
public class InputFormatterStream : InputFormatter
{
/// <inheritdoc />
public InputFormatterStream()
{
SupportedMediaTypes.Add("application/octet-stream");
SupportedMediaTypes.Add("image/jpeg");
}

/// <inheritdoc />
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}

/// <inheritdoc />
protected override bool CanReadType(Type type)
{
if (type == typeof(Stream))
Expand All @@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)

return false;
}

public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@

namespace Org.OpenAPITools.Formatters
{
// Input Type Formatter to allow model binding to Streams
/// <inheritdoc />
public class InputFormatterStream : InputFormatter
{
/// <inheritdoc />
public InputFormatterStream()
{
SupportedMediaTypes.Add("application/octet-stream");
SupportedMediaTypes.Add("image/jpeg");
}

/// <inheritdoc />
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}

/// <inheritdoc />
protected override bool CanReadType(Type type)
{
if (type == typeof(Stream))
Expand All @@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)

return false;
}

public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@

namespace Org.OpenAPITools.Formatters
{
// Input Type Formatter to allow model binding to Streams
/// <inheritdoc />
public class InputFormatterStream : InputFormatter
{
/// <inheritdoc />
public InputFormatterStream()
{
SupportedMediaTypes.Add("application/octet-stream");
SupportedMediaTypes.Add("image/jpeg");
}

/// <inheritdoc />
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}

/// <inheritdoc />
protected override bool CanReadType(Type type)
{
if (type == typeof(Stream))
Expand All @@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)

return false;
}

public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@

namespace Org.OpenAPITools.Formatters
{
// Input Type Formatter to allow model binding to Streams
/// <inheritdoc />
public class InputFormatterStream : InputFormatter
{
/// <inheritdoc />
public InputFormatterStream()
{
SupportedMediaTypes.Add("application/octet-stream");
SupportedMediaTypes.Add("image/jpeg");
}

/// <inheritdoc />
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}

/// <inheritdoc />
protected override bool CanReadType(Type type)
{
if (type == typeof(Stream))
Expand All @@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)

return false;
}

public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@

namespace Org.OpenAPITools.Formatters
{
// Input Type Formatter to allow model binding to Streams
/// <inheritdoc />
public class InputFormatterStream : InputFormatter
{
/// <inheritdoc />
public InputFormatterStream()
{
SupportedMediaTypes.Add("application/octet-stream");
SupportedMediaTypes.Add("image/jpeg");
}

/// <inheritdoc />
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}

/// <inheritdoc />
protected override bool CanReadType(Type type)
{
if (type == typeof(Stream))
Expand All @@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)

return false;
}

public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@

namespace Org.OpenAPITools.Formatters
{
// Input Type Formatter to allow model binding to Streams
/// <inheritdoc />
public class InputFormatterStream : InputFormatter
{
/// <inheritdoc />
public InputFormatterStream()
{
SupportedMediaTypes.Add("application/octet-stream");
SupportedMediaTypes.Add("image/jpeg");
}

/// <inheritdoc />
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}

/// <inheritdoc />
protected override bool CanReadType(Type type)
{
if (type == typeof(Stream))
Expand All @@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)

return false;
}

public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@

namespace Org.OpenAPITools.Formatters
{
// Input Type Formatter to allow model binding to Streams
/// <inheritdoc />
public class InputFormatterStream : InputFormatter
{
/// <inheritdoc />
public InputFormatterStream()
{
SupportedMediaTypes.Add("application/octet-stream");
SupportedMediaTypes.Add("image/jpeg");
}

/// <inheritdoc />
public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}

/// <inheritdoc />
protected override bool CanReadType(Type type)
{
if (type == typeof(Stream))
Expand All @@ -23,10 +31,5 @@ protected override bool CanReadType(Type type)

return false;
}

public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
return InputFormatterResult.SuccessAsync(context.HttpContext.Request.Body);
}
}
}

0 comments on commit 842ca3d

Please sign in to comment.