InactiveProjects / limoncello-collins

Quick start JSON API application (Laravel based)
http://jsonapi.org
71 stars 10 forks source link

Schema is not registered for a resource at path ''. #22

Closed jonwhittlestone closed 8 years ago

jonwhittlestone commented 8 years ago

Hi

I am attempting to replicate limoncello-collins by retracing the steps of your commit

I followed the steps, migrate and seeded, and visited http://idv-server.dev/api/v1/boards/1 However I received the error - Schema is not registered for a resource at path ''.

Do you know why?

I have uploaded my limoncello-collins attempt here

Thanks

Jon

free3-5man commented 8 years ago

@jonwhittlestone

do you add the limoncello.php to directory config? the limoncello.php configured used schemas such as

S::SCHEMAS => [ PostSchema::class, UserSchema::class, RoleSchema::class, ],

neomerx commented 8 years ago

@jonwhittlestone Most likely you try to encode a resource but encoder can't find any Schema for that resorce. Relationship path '' means it's a very top resource which supports my explanation.

neomerx commented 8 years ago

@jonwhittlestone I understand you might want to done all the steps just out of curiosity though it's easier to just take the app :wink:

neomerx commented 8 years ago

I'm closing the question. If you feel you have more please don't hesitate to ask.

neomerx commented 8 years ago

Heh, github lost my answer on this issue...

Anyways, @jonwhittlestone you most likely haven't registered Schema for resource you want to encoder.

I understand you might re-iterate the steps just out of curiosity though it's easier (and less errors) just to use the app as a starting point.

I'm closing the issue. If you feel you have more questions please don't hesitate to ask.