Explorar o código

Skip bodyparameters stage for GET endpoints

shalvah %!s(int64=4) %!d(string=hai) anos
pai
achega
70823a3894
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/Extracting/Extractor.php

+ 3 - 0
src/Extracting/Extractor.php

@@ -164,6 +164,9 @@ class Extractor
 
     protected function fetchBodyParameters(ExtractedEndpointData $endpointData, array $rulesToApply): void
     {
+        if (in_array('GET', $endpointData->httpMethods)) {
+            return;
+        }
         $this->iterateThroughStrategies('bodyParameters', $endpointData, $rulesToApply, function ($results) use ($endpointData) {
             foreach ($results as $key => $item) {
                 $endpointData->bodyParameters[$key] = Parameter::create($item);