Skip to content

Commit 8481aac

Browse files
elazarscaytrase
authored andcommitted
Fixes #113 Update outdated README caching example
1 parent a666a09 commit 8481aac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ $validator = (new \League\OpenAPIValidation\PSR7\ValidatorBuilder)
182182
->setCache($cachePool)
183183
->getResponseValidator();
184184
# or
185-
\League\OpenAPIValidation\PSR15\ValidationMiddleware::fromYamlFile($yamlFile, $cachePool);
185+
$psr15Middleware = (new \OpenAPIValidation\PSR15\ValidationMiddlewareBuilder)
186+
->fromYamlFile($yamlFile)
187+
->setCache($cachePool)
188+
->getValidationMiddleware();
186189
```
187190

188191
You can use `->setCache($pool, $ttl)` call for both PSR-7 and PSR-15 builder in order to set

0 commit comments

Comments
 (0)