Skip to content

Commit

Permalink
Fixed operations transformers had not been loaded (#704)
Browse files Browse the repository at this point in the history
* fixed operations transformers loading

* Fix styling

---------

Co-authored-by: romalytvynenko <[email protected]>
  • Loading branch information
romalytvynenko and romalytvynenko authored Feb 3, 2025
1 parent de7ff3e commit 91ded13
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/ScrambleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,12 @@ public function configurePackage(Package $package): void
], $exceptionToResponseExtensions),
);
});
}

public function bootingPackage()
{
Scramble::configure()
->useConfig(config('scramble'))
->withOperationTransformers(function (OperationTransformers $transformers) {
$extensions = array_merge(config('scramble.extensions', []), Scramble::$extensions);

Expand All @@ -197,12 +201,6 @@ public function configurePackage(Package $package): void

$transformers->append($operationExtensions);
});
}

public function bootingPackage()
{
Scramble::configure()
->useConfig(config('scramble'));

$this->app->booted(function (Application $app) {
Scramble::configure()
Expand Down

0 comments on commit 91ded13

Please sign in to comment.