@@ -35,14 +35,14 @@ private function docsToOpenApi(array $docs): void
35
35
$ this ->openApi ['paths ' ] = [];
36
36
foreach ($ docs as $ doc ) {
37
37
$ requestHasFile = false ;
38
- $ httpMethod = strtolower ($ doc ->getHttpMethod ());
39
- $ isGet = $ httpMethod == 'get ' ;
40
- $ isPost = $ httpMethod == 'post ' ;
41
- $ isPut = $ httpMethod == 'put ' ;
42
- $ isDelete = $ httpMethod == 'delete ' ;
38
+ $ httpMethod = strtolower ($ doc ->getHttpMethod ());
39
+ $ isGet = $ httpMethod == 'get ' ;
40
+ $ isPost = $ httpMethod == 'post ' ;
41
+ $ isPut = $ httpMethod == 'put ' ;
42
+ $ isDelete = $ httpMethod == 'delete ' ;
43
43
44
44
$ this ->openApi ['paths ' ][$ doc ->getUri ()][$ httpMethod ]['description ' ] = $ doc ->getDocBlock ();
45
- $ this ->openApi ['paths ' ][$ doc ->getUri ()][$ httpMethod ]['parameters ' ] = [];
45
+ $ this ->openApi ['paths ' ][$ doc ->getUri ()][$ httpMethod ]['parameters ' ] = [];
46
46
47
47
$ this ->openApi ['paths ' ][$ doc ->getUri ()][$ httpMethod ]['responses ' ] = config ('request-docs.open_api.responses ' , []);
48
48
@@ -70,7 +70,7 @@ private function docsToOpenApi(array $docs): void
70
70
foreach ($ doc ->getRules () as $ attribute => $ rules ) {
71
71
foreach ($ rules as $ rule ) {
72
72
if ($ isGet ) {
73
- $ parameter = $ this ->makeQueryParameterItem ($ attribute , $ rule );
73
+ $ parameter = $ this ->makeQueryParameterItem ($ attribute , $ rule );
74
74
$ this ->openApi ['paths ' ][$ doc ->getUri ()][$ httpMethod ]['parameters ' ][] = $ parameter ;
75
75
}
76
76
if ($ isPost || $ isPut || $ isDelete ) {
@@ -108,7 +108,7 @@ protected function makeRequestBodyItem(string $contentType): array
108
108
'content ' => [
109
109
$ contentType => [
110
110
'schema ' => [
111
- 'type ' => 'object ' ,
111
+ 'type ' => 'object ' ,
112
112
'properties ' => [],
113
113
],
114
114
],
@@ -122,9 +122,9 @@ protected function makeRequestBodyContentPropertyItem(string $rule): array
122
122
$ type = $ this ->getAttributeType ($ rule );
123
123
124
124
return [
125
- 'type ' => $ type ,
125
+ 'type ' => $ type ,
126
126
'nullable ' => str_contains ($ rule , 'nullable ' ),
127
- 'format ' => $ this ->attributeIsFile ($ rule ) ? 'binary ' : $ type ,
127
+ 'format ' => $ this ->attributeIsFile ($ rule ) ? 'binary ' : $ type ,
128
128
];
129
129
}
130
130
0 commit comments