invoke icon indicating copy to clipboard operation
invoke copied to clipboard

define same multipe uri with different method

Open praswicaksono opened this issue 9 years ago • 3 comments

for example I have this config

/user/login:
  groups: [Admin]
  methods: [post]
/user/login:
  groups: [Guest]
  methods: [get]

It seem yml loader wont load same key twice, is there any solution?

praswicaksono avatar Oct 11 '15 03:10 praswicaksono

Hmm, that would take a bit of a rewrite to turn the route keys into sets vs just the single item. It's not overly difficult though - I've done it with an internal project that needed this same kind of setup. You're more than welcome to try to tackle it if you'd like or I can see what I can do eventually.

It would involve making an update around two places:

  • where it builds out the configuration into an array of the routes/settings
  • a change to findRouteMatch to work with the subsets vs just the single layer array

enygma avatar Oct 11 '15 12:10 enygma

sorry for late reply, yeah I can handle it myself. Do you want me to submit PR?

praswicaksono avatar Oct 17 '15 08:10 praswicaksono

No problem - yes, that'd be great!

enygma avatar Oct 17 '15 11:10 enygma