-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New remote method generator removing matching named methods in other models #20
Comments
+1 |
Nice catch. I suspect this is a bug in loopback-workspace and the way how it creates unique id for remote methods. See
@WoodyWoodsta @idushes would you like to contribute the fix yourself? I am happy to help you along the way, just mention my GH handle in the pull request description. |
@bajtos If I manage to find time for it, I will certainly have a look. |
@bajtos from what i can make out in model-method.json, id refers to the name of the method hence it can't be repeated otherwise there might be some breaking changes and same method names in different models work fine in the projects currently |
Hello, I am afraid I don't have enough time to look into this in details. The value used for the I don't think a middleware based approach would work, we have many places that's invoking the JavaScript API directly, loopback-cli being a prime example (via generator-loopback). |
Bug or feature request
Repro steps of bug
Expected result
AFAIK, remote methods with the same name but in different models (ie. resulting in different URL paths) are valid.
Actual result (if bug)
Looback remote method generator is removing a remote method from any model upon generating a second one with the same name.
Additional information (Node.js version, LoopBack version, etc)
Loopback:
2.0.0 ([email protected])
Node:
v6.10.0
Update
This appears to also occur when performing any cli operation in a project with two remote methods with the same name (manually generated)
The text was updated successfully, but these errors were encountered: