Skip to content

Commit

Permalink
feat(404-prepartor): exclude new 404 example from examples-preparator
Browse files Browse the repository at this point in the history
  • Loading branch information
sidux committed Jun 27, 2024
1 parent 7ef3eb1 commit 7ea6335
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Preparator/ExamplesPreparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ private function handleExtension(Operations $operations): Operations
*/
private function prepareTestCases(Operation $operation): iterable
{
$examples = $operation->getExamples();
$examples = $operation
->getExamples()
->filter(fn (OperationExample $example) => $example->getName() !== '404')
;
if ($this->config->autoCreateWhenMissing && $examples->count() === 0) {
$examples = new OperationExamples([
$operation->getRandomExample(),
Expand Down

0 comments on commit 7ea6335

Please sign in to comment.