line / armeria

Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
https://armeria.dev
Apache License 2.0
4.8k stars 912 forks source link

Fix a regession where an invalid path pattern is generated for gRPC trancoding #5729

Closed ikhoon closed 4 months ago

ikhoon commented 4 months ago

Motivation:

PR #5679 allows groups name in a regex path pattern to start with @. However, group names of a regular expression must start with a letter. https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#groupname

Modifications:

Result:

Fix a regression caused by #5679

github-actions[bot] commented 4 months ago

🔍 Build Scan® (commit: 5b236a4f03b71f028b4e1e1b4e9020de27c0f3d0)

Job name Status Build Scan®
ikhoon commented 4 months ago

In general, what do you think of always using the P\\d pattern for REGEX case so that underscored variable names are also supported?

Agreed. I think we are on the same page. Addressed at 16df88b (#5729)

minwoox commented 4 months ago

OOps we should fix this test:

HttpJsonTranscodingTest > conflictingParamNamesReturnsCorrectly() FAILED
    org.opentest4j.AssertionFailedError: 
    expected: 200
     but was: 404
minwoox commented 4 months ago

@ikhoon 👍 👍 👍