Skip to content

out of the box error: null returned in ResourceContainer #10

Description

@minamassoud

I am trying the package out of the box, couldn't generate the documentation on a running project though

LaravelJsonApi\OpenApiSpec\ResourceContainer::resource(): Return value must be of type LaravelJsonApi\Core\Resources\JsonApiResource, null returned

  at vendor/byteit/openapi-spec-generator/src/ResourceContainer.php:34
     30▕         $fqn = $this->getFQN($model);
     31▕         if(!isset($this->resource[$fqn])){
     32▕             $this->loadResources($fqn);
     33▕         }
  ➜  34▕         return $this->resources[$fqn]->first();
     35▕     }
     36▕ 
     37▕     /**
     38▕      * @param  mixed  $model

      +11 vendor frames 
  12  [internal]:0
      LaravelJsonApi\OpenApiSpec\Builders\PathsBuilder::LaravelJsonApi\OpenApiSpec\Builders\{closure}(Object(LaravelJsonApi\OpenApiSpec\Route))

      +2 vendor frames 
  15  [internal]:0
      LaravelJsonApi\OpenApiSpec\Builders\PathsBuilder::LaravelJsonApi\OpenApiSpec\Builders\{closure}(Object(Illuminate\Support\Collection), "/settings")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions