From e30bd1175992a492d97d5ce019004f3be9ba34da Mon Sep 17 00:00:00 2001 From: Christer van der Meeren Date: Wed, 20 Dec 2023 15:33:57 +0100 Subject: [PATCH] Remove unneeded explicit type parameter --- RELEASE_NOTES.md | 5 +++++ src/Felicity/IServiceCollectionExtensions.fs | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index dee4d19..8356e9e 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,11 @@ Release notes ============== +### Unreleased + +* **Breaking:** Removed the unneeded explicit type parameters on `EnableUnknownFieldStrictMode`, + `EnableUnknownQueryParamStrictMode`, and `LogInvalidJsonRequestBodies` + ### 0.22.1 (2023-12-18) * Added `SkipStandardAcceptValidation`, `SkipStandardContentTypeValidation`, and `SkipStandardQueryParamNameValidation` diff --git a/src/Felicity/IServiceCollectionExtensions.fs b/src/Felicity/IServiceCollectionExtensions.fs index 992a383..d0146bd 100644 --- a/src/Felicity/IServiceCollectionExtensions.fs +++ b/src/Felicity/IServiceCollectionExtensions.fs @@ -177,7 +177,7 @@ type JsonApiConfigBuilder<'ctx> = internal { /// Returns an error if an unknown field is encountered in a request body. If warnOnly (default false) is true, log a /// warning instead of returning an error. The default log level is Warning. - member this.EnableUnknownFieldStrictMode<'ctx>(?warnOnly, ?warnLogLevel) = + member this.EnableUnknownFieldStrictMode(?warnOnly, ?warnLogLevel) = let warnOnly = defaultArg warnOnly false let warnLogLevel = defaultArg warnLogLevel LogLevel.Warning @@ -193,7 +193,7 @@ type JsonApiConfigBuilder<'ctx> = internal { /// Returns an error if an unknown query parameter is encountered in a request. Query parameters are only considered /// "known" if they are parsed using RequestParserHelper/RequestParser. If warnOnly (default false) is true, log a /// warning instead of returning an error. The default log level is Warning. - member this.EnableUnknownQueryParamStrictMode<'ctx>(?warnOnly, ?warnLogLevel) = + member this.EnableUnknownQueryParamStrictMode(?warnOnly, ?warnLogLevel) = let warnOnly = defaultArg warnOnly false let warnLogLevel = defaultArg warnLogLevel LogLevel.Warning @@ -215,7 +215,7 @@ type JsonApiConfigBuilder<'ctx> = internal { /// sufficient details to debug invalid requests. Request body logging as enabled by this method is intended to aid /// debugging request bodies with invalid JSON (i.e., where a JsonException was thrown when deserializing), where the /// returned error is fairly generic (to avoid leaking server implementation details). - member this.LogInvalidJsonRequestBodies<'ctx>(?logLevel, ?maxSize) = + member this.LogInvalidJsonRequestBodies(?logLevel, ?maxSize) = let logLevel = defaultArg logLevel LogLevel.Trace {