Skip to content

Conversation

@Suryanshu185
Copy link

@Suryanshu185 Suryanshu185 commented Nov 6, 2025

Implement comprehensive URL pattern validation in grpc-gateway to prevent common routing conflicts and performance issues. Validation is enabled by default with strict enforcement to ensure API reliability.

Key features:

  • Validates maximum 4 static segments at URL pattern start
  • Prevents consecutive static segments after dynamic segments
  • Fails compilation on invalid patterns with clear error messages

The validator integrates into the HTTP rule parsing pipeline and validates patterns during protobuf code generation. Invalid patterns cause compilation to fail, forcing developers to use proper URL design patterns.

References to other Issues or PRs

Have you read the Contributing Guidelines?

Brief description of what is fixed or changed

Other comments

Implement comprehensive URL pattern validation in grpc-gateway to
prevent common routing conflicts and performance issues. Validation
is enabled by default with strict enforcement to ensure API reliability.

Key features:
- Validates maximum 4 static segments at URL pattern start
- Prevents consecutive static segments after dynamic segments
- Fails compilation on invalid patterns with clear error messages

The validator integrates into the HTTP rule parsing pipeline and
validates patterns during protobuf code generation. Invalid patterns
cause compilation to fail, forcing developers to use proper URL
design patterns.

Override option available for exceptional cases:
- Utility script: validation_disabled.sh

Jira ID: CLOUD-373>

Signed-off-by: suryanshu185 <suryanshu.gupta@kluisz.ai>
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.

1 participant