Answer the question
In order to leave comments, you need to log in
What do your APIs look like when you need to render a One-To-One relationship?
What do your APIs look like when you need to render a One-To-One relationship? (account 1 : 1 staff)
You can do something like this:
/api/account/1/staff/
but it looks like working with a staff collection (even the controller methods that the ZF2 router calls will be called getList(), deleteList() )
Answer the question
In order to leave comments, you need to log in
I usually have this: staff is a property of the account object, so either all information about staff is displayed at '/api/account/1', or only id is displayed there, and the staff object itself is obtained by the second request to '/api/staff/x '.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question