json-api-server
json-api-server copied to clipboard
Support client-generated IDs when creating resources
As per https://jsonapi.org/format/#crud-creating-client-ids
setId method added to AdapterInterface in 0.2, though this is not yet used
Likely API:
class FooResource
{
public function id()
{
return Id::make()
->get(...)
->allowClientGenerated()
->default(...)
->set(...)
->validate(...)
}
}