Skip to content

FractalAction not generated for root path #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SOHELAHMED7 opened this issue Apr 9, 2025 · 1 comment · May be fixed by #103
Open

FractalAction not generated for root path #102

SOHELAHMED7 opened this issue Apr 9, 2025 · 1 comment · May be fixed by #103
Assignees

Comments

@SOHELAHMED7
Copy link
Member

Config:

openapi: "3.0.0"
info:
  version: 1.0.0
  title: Issue14Test testNestedModuleInXRoute \#14

paths:
  '/':
    get:
      x-route: fruit/mango/alphonso/list # action ID `list` is mandatory for fractal standalone action generation
      operationId: listTasks
      responses:
        '200':
          $ref: '#/components/responses/Tasks'
<?php

return [
    'openApiPath' => '@specs/issue_fix/14_nested_module_in_x_route/index.yml',
    'generateUrls' => true,
    'generateModels' => true,
    'useJsonApi' => true,
    'excludeModels' => [
        'Error',
    ],
    'generateControllers' => true,
    'generateMigrations' => false,
    'generateModelFaker' => false,

];
Expected

File: modules/fruit/modules/mango/controllers/base/AlphonsoController.php

+            'list' => [\n
+                'class' => \insolita\fractal\actions\ListAction::class,\n
+                'checkAccess' => [$this, 'checkAccess'],\n
+                'transformer' => \app\transformers\TaskTransformer::class,\n
+                'modelClass' => \app\models\Task::class,\n
+                'resourceKey' => 'tasks',\n
+                'dataFilter' => null,\n
+                'prepareDataProvider' => null\n
+            ],\n

Actual
+    abstract public function actionList();\n

Detected this issue while implementing #14. So tests stubs can be used from there

@SOHELAHMED7 SOHELAHMED7 self-assigned this Apr 9, 2025
@SOHELAHMED7
Copy link
Member Author

Image

@SOHELAHMED7 SOHELAHMED7 linked a pull request Apr 15, 2025 that will close this issue
@SOHELAHMED7 SOHELAHMED7 linked a pull request Apr 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant