File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 55namespace DenisKorbakov \LaravelDataScribe \Documentations ;
66
77use DenisKorbakov \LaravelDataScribe \Params \BodyParams ;
8+ use DenisKorbakov \LaravelDataScribe \Transforms \BodyParam \AtrTBodyParamTransform ;
89use Knuckles \Scribe \Tools \DocumentationConfig ;
910
1011final readonly class BodyParamDoc implements Doc
1112{
1213 public function __construct (
1314 public string $ laravelDataClass ,
14- public array $ bodyParamAttribute ,
15+ public array $ attributeArguments ,
1516 public DocumentationConfig $ config ,
1617 ) {}
1718
@@ -20,7 +21,9 @@ public function generate(): ?array
2021 if (empty ($ this ->laravelDataClass )) {
2122 return null ;
2223 }
24+ $ attributesDoc = (new AtrTBodyParamTransform ($ this ->attributeArguments ))->transform ();
25+ $ bodyParamsDoc = (new BodyParams ($ this ->laravelDataClass , $ this ->config ))->generate ();
2326
24- return ( new BodyParams ( $ this -> laravelDataClass , $ this -> config ))-> generate ( );
27+ return array_merge ( $ attributesDoc , $ bodyParamsDoc );
2528 }
2629}
You can’t perform that action at this time.
0 commit comments