fromYaml($yaml)->getServerRequestValidator()->getSchema(); $specFinder = new SpecFinder($schema); $address = new CallbackAddress('/products.create', 'post', 'productCreated', 'post'); $operation = $specFinder->findOperationSpec($address); // Some assertions to ensure we have the right operation $this->assertEquals('boolean', $operation->requestBody->content['application/json']->schema->properties['success']->type); $this->assertEquals(['200'], array_keys(iterator_to_array($operation->responses->getIterator()))); } }