@@ -33,7 +33,7 @@ public function openApi(array $docs): LaravelRequestDocsToOpenApi
33
33
private function docsToOpenApi (array $ docs ): void
34
34
{
35
35
$ 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 );
37
37
$ excludeHttpMethods = array_map (fn ($ item ) => strtolower ($ item ), config ('request-docs.open_api.exclude_http_methods ' , []));
38
38
39
39
foreach ($ docs as $ doc ) {
@@ -74,7 +74,7 @@ private function docsToOpenApi(array $docs): void
74
74
75
75
$ contentType = $ requestHasFile ? 'multipart/form-data ' : 'application/json ' ;
76
76
77
- if ($ isPost || $ isPut || ($ isDelete && $ includeBodyForDelete )) {
77
+ if ($ isPost || $ isPut || ($ isDelete && $ deleteWithBody )) {
78
78
$ this ->openApi ['paths ' ][$ uriLeadingSlash ][$ httpMethod ]['requestBody ' ] = $ this ->makeRequestBodyItem ($ contentType );
79
79
}
80
80
@@ -84,7 +84,7 @@ private function docsToOpenApi(array $docs): void
84
84
$ parameter = $ this ->makeQueryParameterItem ($ attribute , $ rule );
85
85
$ this ->openApi ['paths ' ][$ uriLeadingSlash ][$ httpMethod ]['parameters ' ][] = $ parameter ;
86
86
}
87
- if ($ isPost || $ isPut || ($ isDelete && $ includeBodyForDelete )) {
87
+ if ($ isPost || $ isPut || ($ isDelete && $ deleteWithBody )) {
88
88
$ this ->openApi ['paths ' ][$ uriLeadingSlash ][$ httpMethod ]['requestBody ' ]['content ' ][$ contentType ]['schema ' ]['properties ' ][$ attribute ] = $ this ->makeRequestBodyContentPropertyItem ($ rule );
89
89
}
90
90
}
@@ -102,7 +102,6 @@ protected function makeQueryParameterItem(string $attribute, $rule): array
102
102
if (is_array ($ rule )) {
103
103
$ rule = implode ('| ' , $ rule );
104
104
}
105
-
106
105
$ parameter = [
107
106
'name ' => $ attribute ,
108
107
'description ' => $ rule ,
0 commit comments