Skip to content

Commit

Permalink
added new config to scramble
Browse files Browse the repository at this point in the history
  • Loading branch information
romalytvynenko committed Jan 31, 2025
1 parent 81b8c4f commit 7d86c34
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/Scramble.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Dedoc\Scramble\Support\Generator\ServerVariable;
use Dedoc\Scramble\Support\Generator\Types\Type as OpenApiType;
use Dedoc\Scramble\Support\RouteInfo;
use Dedoc\Scramble\Support\ServerFactory;
use Illuminate\Routing\Route;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Route as RouteFacade;
Expand Down
3 changes: 0 additions & 3 deletions src/ScrambleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
use Dedoc\Scramble\Support\InferExtensions\ValidatorTypeInfer;
use Dedoc\Scramble\Support\OperationExtensions\ParameterExtractor\AttributesParametersExtractor;
use Dedoc\Scramble\Support\OperationExtensions\ParameterExtractor\MethodCallsParametersExtractor;
use Dedoc\Scramble\Support\ServerFactory;
use Dedoc\Scramble\Support\TypeToSchemaExtensions\AnonymousResourceCollectionTypeToSchema;
use Dedoc\Scramble\Support\TypeToSchemaExtensions\CollectionToSchema;
use Dedoc\Scramble\Support\TypeToSchemaExtensions\CursorPaginatorTypeToSchema;
Expand Down Expand Up @@ -147,8 +146,6 @@ public function configurePackage(Package $package): void
}, $indexBuilders);
});

$this->app->singleton(ServerFactory::class);

$this->app->bind(TypeTransformer::class, function (Application $application, array $parameters) {
$extensions = array_merge(config('scramble.extensions', []), Scramble::$extensions);

Expand Down
9 changes: 9 additions & 0 deletions tests/GeneratorConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@

class GeneratorConfigTest extends TestCase
{
protected function setUp(): void
{
if (! class_exists(TestingFeature::class)) {
$this->markTestSkipped('TestingFeature class does not exist');
}

parent::setUp();
}

protected function resolveApplicationConfiguration($app)
{
parent::resolveApplicationConfiguration($app);
Expand Down

0 comments on commit 7d86c34

Please sign in to comment.