loopback-next
loopback-next copied to clipboard
loopback/openapi-v3 multiples paths
Hi , How can i add multiples paths to a method.
For example the method foo can be decorated by /foo How can i add /bar on the foo method.
An example of use case :
/user/{id}/orders/{id} ---> I retrieve an order by id /order/{id} ---> i retrieve an order by ID too
should i duplicate the foo method ?
@godartm you have to create a new method for each new route. You want to these two routes to your controller:
- /user/{id}/orders/{id}
- /order/{id}
Then create their corresponding handler methods.
ok , thanks for reply.