Skip to content

Commit

Permalink
Support Status Code Ranges 2XX, 3XX, 4XX, 5XX
Browse files Browse the repository at this point in the history
  • Loading branch information
wolffc authored Feb 28, 2022
1 parent cc3a4a1 commit 852d843
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/PSR7/SpecFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ public function findResponseSpec($addr): ResponseSpec

$response = $operation->responses->getResponse((string) $addr->responseCode());

if(! $response){
$response = $operation->responses->getResponse(substr($addr->responseCode(),0,1) . 'XX');
}

if (! $response) {
$response = $operation->responses->getResponse('default');
}
Expand Down

0 comments on commit 852d843

Please sign in to comment.