UnexpectedBodyError
sttp.tapir.testing.UnexpectedBodyError
case class UnexpectedBodyError(e: AnyEndpoint, statusCode: StatusCode) extends EndpointVerificationError
Endpoint e
defines outputs where status code indicates no body, but at the same time a body output is specified. For status codes 204 and 304 it's forbidden by specification.
Example of incorrectly defined endpoint:
endpoint.get.in("x").out(jsonBody[Unit]).out(statusCode(StatusCode.NoContent))
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
Keywords
- no keywords
- override
Inherited
- Not inherited
- Product
In this article