moleculerjs / moleculer-web

:earth_africa: Official API Gateway service for Moleculer framework
http://moleculer.services/docs/moleculer-web.html
MIT License
291 stars 119 forks source link

Routes with same path ignored after 0.9.1 #293

Closed giovanni-bertoncelli closed 2 years ago

giovanni-bertoncelli commented 2 years ago

I think there is an hidden breaking change between version 0.9.1 and 0.10.0 since routes with the same path are not correctly loaded:

  settings: {
    port,
    routes: [{
       path: '/api',
       aliases: {
              'GET /diagnostic': `diagnostic.getStatus`,
        }
    }, {
       path: '/api',
      aliases: {
              'GET /hello': `hello.hi`,
        }
       // ...other settings for group
    }],
    use: [headersParser]
  },

Calling each of the aliases on 0.9.1 resolved correctly the endpoint and the action. With the 0.10.0 returns always a 404.

intech commented 2 years ago

Need to set a unique name for routes, read this changelog

giovanni-bertoncelli commented 2 years ago

Ok thank you