You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A URI with duplicate parameter names such as /organisation/<id>/teams/<id>, with the relevant resource definitions, will come out with only 1 id parameter, with the value of the last matched parameter.
This is an issue with using standard parameter schemes more than once in a resource hierarchy. It can be replicated using the following resource definitions and the uri /parent/1/child/1
Controller methods currently expect a hash of parameter values keyed on parameter names, which are defined in the parameter scheme. My current thought is this may be resolvable by creating some kind of unique name combining the resource name and the parameter name (eg Child_id). Generated names would need to be predictable and consistent, and not require any configuration at all.
An alternative could be to allow this behaviour to continue, and instead try enforce the uniqueness of parameter names in the parameter scheme. For example: new Resource("Parent", "/parent", new Scheme\Id("parent_id"));
The text was updated successfully, but these errors were encountered:
An alternative proposal here would be to alter controllers to expect some object which can retrieve parameters based on the resource name and parameter name. For example:
A URI with duplicate parameter names such as
/organisation/<id>/teams/<id>
, with the relevant resource definitions, will come out with only 1 id parameter, with the value of the last matched parameter.This is an issue with using standard parameter schemes more than once in a resource hierarchy. It can be replicated using the following resource definitions and the uri
/parent/1/child/1
Controller methods currently expect a hash of parameter values keyed on parameter names, which are defined in the parameter scheme. My current thought is this may be resolvable by creating some kind of unique name combining the resource name and the parameter name (eg
Child_id
). Generated names would need to be predictable and consistent, and not require any configuration at all.An alternative could be to allow this behaviour to continue, and instead try enforce the uniqueness of parameter names in the parameter scheme. For example:
new Resource("Parent", "/parent", new Scheme\Id("parent_id"));
The text was updated successfully, but these errors were encountered: