Add L2 URI templates/fix issue on determination of varnames in URI templates#172
Add L2 URI templates/fix issue on determination of varnames in URI templates#172dmartinezg wants to merge 1 commit intomasterfrom
Conversation
| '#%RAML 0.8', | ||
| 'title: Title', | ||
| 'baseUri: http://domain', | ||
| '/resource/{parameter1,parameter2}:' |
There was a problem hiding this comment.
This isn't level 2, I don't think we should accidentally test or support > 2.
There was a problem hiding this comment.
That is an interesting point, yet, I don't know how to tell the URI template library not to accept these
There was a problem hiding this comment.
Neither, can we just skip these tests and keep the implementation to level 2 only? The parser was already used for just level 1, so I'm guessing it's simple enough?
If it helps, other tooling I'll be implementing will literally be based on RegExps instead of the parser.
There was a problem hiding this comment.
I don't see any commit changes? Anyway, I'm currently support L2 parameters in https://github.com/mulesoft-labs/raml-path-match/blob/master/raml-path-match.js#L36 so you may be able to re-use that if you don't want the additional level handling.
@blakeembrey, @xaka, this brings L2 URI templates, and fixes an issue in the way the parser extracted the variable names from the templates.
Change is actually very minor, a couple of changes in validator and transformations, and 4 new tests.