Skip to content

Commit

Permalink
Remove unneeded explicit type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Christer van der Meeren committed Dec 20, 2023
1 parent 6db930b commit e30bd11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
6 changes: 3 additions & 3 deletions src/Felicity/IServiceCollectionExtensions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

{
Expand Down

0 comments on commit e30bd11

Please sign in to comment.