Skip to content

Commit 7f5a41e

Browse files
committed
fix: canread on formatter
1 parent 60308a0 commit 7f5a41e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Swashbuckle.WebApi.Server/Controllers/ReturnTextControllers.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ type TextPlainInputFormatter() as this =
5757
this.SupportedEncodings.Add(Encoding.UTF8)
5858
this.SupportedEncodings.Add(Encoding.Unicode)
5959

60-
override _.CanRead(context) =
61-
context.ModelType = typeof<string>
60+
override this.CanRead(context) =
61+
base.CanRead(context) && context.ModelType = typeof<string>
6262

6363
override _.ReadRequestBodyAsync(context, encoding) =
6464
task {

0 commit comments

Comments
 (0)