Skip to content

Conversation

@rbygrave
Copy link
Contributor

This follows the approach of Javalin 4.x

So normal path parameters are like {foo} and slash accepting path parameters are like <foo>. These can be used to replace splats and make the API more consistent and remove the concept of splats.

@rbygrave rbygrave added this to the 2.0 milestone Jul 27, 2021
@rbygrave rbygrave self-assigned this Jul 27, 2021
@rbygrave rbygrave merged commit b15b7ca into master Jul 27, 2021
@tipsy
Copy link
Collaborator

tipsy commented Jul 27, 2021

Nice!

@rbygrave
Copy link
Contributor Author

Yeah, the slash accepting parameters is a great idea - I love how it replaces splats, nice improvement !! The Jex implementation uses regex group matching to split out the segments (rather than the parse approach I see ParserState.kt). That approach made sense for Jex because it supports path parameters that have user defined regex restrictions like {id:[0-9]+} and {id:[0-9]{4}}.

Jex has that feature to match JAX-RS parameters. That idea wasn't accepted in Javalin javalin/javalin#303.

@rbygrave rbygrave deleted the feature/path-parsing branch July 27, 2021 21:15
@tipsy
Copy link
Collaborator

tipsy commented Jul 27, 2021

I'm glad you like it, all credit goes to @Playacem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants