@@ -33,7 +33,7 @@ public function openApi(array $docs): LaravelRequestDocsToOpenApi
3333 private function docsToOpenApi (array $ docs ): void
3434 {
3535 $ this ->openApi ['paths ' ] = [];
36- $ includeBodyForDelete = config ('request-docs.open_api.include_body_on_delete ' , false );
36+ $ deleteWithBody = config ('request-docs.open_api.delete_with_body ' , false );
3737 $ excludeHttpMethods = array_map (fn ($ item ) => strtolower ($ item ), config ('request-docs.open_api.exclude_http_methods ' , []));
3838
3939 foreach ($ docs as $ doc ) {
@@ -74,7 +74,7 @@ private function docsToOpenApi(array $docs): void
7474
7575 $ contentType = $ requestHasFile ? 'multipart/form-data ' : 'application/json ' ;
7676
77- if ($ isPost || $ isPut || ($ isDelete && $ includeBodyForDelete )) {
77+ if ($ isPost || $ isPut || ($ isDelete && $ deleteWithBody )) {
7878 $ this ->openApi ['paths ' ][$ uriLeadingSlash ][$ httpMethod ]['requestBody ' ] = $ this ->makeRequestBodyItem ($ contentType );
7979 }
8080
@@ -84,7 +84,7 @@ private function docsToOpenApi(array $docs): void
8484 $ parameter = $ this ->makeQueryParameterItem ($ attribute , $ rule );
8585 $ this ->openApi ['paths ' ][$ uriLeadingSlash ][$ httpMethod ]['parameters ' ][] = $ parameter ;
8686 }
87- if ($ isPost || $ isPut || ($ isDelete && $ includeBodyForDelete )) {
87+ if ($ isPost || $ isPut || ($ isDelete && $ deleteWithBody )) {
8888 $ this ->openApi ['paths ' ][$ uriLeadingSlash ][$ httpMethod ]['requestBody ' ]['content ' ][$ contentType ]['schema ' ]['properties ' ][$ attribute ] = $ this ->makeRequestBodyContentPropertyItem ($ rule );
8989 }
9090 }
@@ -102,7 +102,6 @@ protected function makeQueryParameterItem(string $attribute, $rule): array
102102 if (is_array ($ rule )) {
103103 $ rule = implode ('| ' , $ rule );
104104 }
105-
106105 $ parameter = [
107106 'name ' => $ attribute ,
108107 'description ' => $ rule ,
0 commit comments