Closed markusjura closed 8 years ago
When collecting and converting the Lagom endpoints to ConductR endpoints we so far extract the the Lagom endpoint path as:
\Q/api/users\E => /api/users \Q/api/users/\E([^/]+) => /api/users/ \Q/api/users/\E([^/]+)\Q/friends\E => /api/users/\E([^/]+)\Q/friends
The last one /api/users/\E([^/]+)\Q/friends\E will the following error during bundle:dist:
/api/users/\E([^/]+)\Q/friends\E
bundle:dist
[info] java.net.URISyntaxException: Illegal character in path at index 17: http://:9000/api/users/\E([^/]+)\Q/friends?preservePath
In other words we've got an error for all uri path that contain a path parameter (:id) but do not end with the path parameter.
:id
The regex extractor has been changed to that the extracted path now always ends before the first path parameter. The above example results into:
\Q/api/users\E => /api/users \Q/api/users/\E([^/]+) => /api/users/ \Q/api/users/\E([^/]+)\Q/friends\E => /api/users/
The tests have been enhanced to check the above cases.
Lgtm
Superceded by https://github.com/typesafehub/sbt-lagom-bundle/pull/12
When collecting and converting the Lagom endpoints to ConductR endpoints we so far extract the the Lagom endpoint path as:
The last one
/api/users/\E([^/]+)\Q/friends\E
will the following error duringbundle:dist
:In other words we've got an error for all uri path that contain a path parameter (
:id
) but do not end with the path parameter.The regex extractor has been changed to that the extracted path now always ends before the first path parameter. The above example results into: