carlansley / swagger2

Loading, parsing and validating requests to HTTP services based on Swagger v2.0 documents
MIT License
25 stars 17 forks source link

match from beginning #20

Closed supertong closed 6 years ago

supertong commented 6 years ago

Hey, I have two similar routes looks like following:

/conversation/{id}/comment/{commentId}
/comment/{commentId}

and it would break the validator, because it looks for match from the end of the string.

If there any specific reason that we don't match from the beginning of the path? And where shall I add test for this? Don't find a compiler.spec.ts.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling b16293a28e47fe6cde1c8a65a09bb431eeee775b on supertong:fix/double-route into f58bf7ec3829a3f756ba910e6e13b743bb5efcca on carlansley:master.

carlansley commented 6 years ago

Ah no reason, this is simply a bug I think. :)

I'll merge it now, lgtm.