Skip to content

Commit

Permalink
Fix no_body request mode
Browse files Browse the repository at this point in the history
  • Loading branch information
danslapman committed Jan 30, 2023
1 parent d959360 commit 2b368e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ final case class RequestWithoutBody(
query: Map[JsonOptic, Map[Keyword.Json, Json]] = Map.empty
) extends HttpStubRequest {
override def checkBody(rBody: RequestBody): Boolean =
AbsentRequestBody.subset.getOption(rBody).isDefined
AbsentRequestBody.subset.getOption(rBody).isDefined ||
SimpleRequestBody.subset.getOption(rBody).exists(_.value.isEmpty)

override def extractJson(rBody: RequestBody): Option[Json] = None

Expand All @@ -227,7 +228,7 @@ final case class RequestWithAnyBody(
query: Map[JsonOptic, Map[Keyword.Json, Json]] = Map.empty
) extends HttpStubRequest {
override def checkBody(rBody: RequestBody): Boolean =
AbsentRequestBody.subset.getOption(rBody).isEmpty
SimpleRequestBody.subset.getOption(rBody).exists(_.value.nonEmpty)

override def extractJson(rBody: RequestBody): Option[Json] = None

Expand Down
2 changes: 1 addition & 1 deletion backend/project/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ object Settings {

val common = Seq(
organization := "ru.tinkoff",
version := "3.5.0",
version := "3.5.1",
scalaVersion := "2.13.10",
Compile / packageDoc / publishArtifact := false,
Compile / packageSrc / publishArtifact := false,
Expand Down

0 comments on commit 2b368e2

Please sign in to comment.