diff --git a/src/JsonSchema/Interceptor/JsonSchemaInterceptor.php b/src/JsonSchema/Interceptor/JsonSchemaInterceptor.php index 78b4318b..b92d197b 100644 --- a/src/JsonSchema/Interceptor/JsonSchemaInterceptor.php +++ b/src/JsonSchema/Interceptor/JsonSchemaInterceptor.php @@ -60,7 +60,7 @@ public function invoke(MethodInvocation $invocation): ResourceObject $ro = $invocation->proceed(); assert($ro instanceof ResourceObject); - if ($ro->body && $ro->code === 200 || $ro->code === 201) { + if ($ro->body !== [] && $ro->code === 200 || $ro->code === 201) { $this->validateResponse($ro, $jsonSchema); }