fix: register mismatch when no brace capture
This commit is contained in:
parent
5fe983c486
commit
a15a5c1f7a
|
@ -93,9 +93,9 @@ func (server *Server) collide() error {
|
||||||
if !aIsCapture && !bIsCapture {
|
if !aIsCapture && !bIsCapture {
|
||||||
if aPart == bPart {
|
if aPart == bPart {
|
||||||
partErrors = append(partErrors, fmt.Errorf("(%s '%s') vs (%s '%s'): %w (same path '%s')", aService.Method, aService.Pattern, bService.Method, bService.Pattern, ErrPatternCollision, aPart))
|
partErrors = append(partErrors, fmt.Errorf("(%s '%s') vs (%s '%s'): %w (same path '%s')", aService.Method, aService.Pattern, bService.Method, bService.Pattern, ErrPatternCollision, aPart))
|
||||||
}
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// A captures B -> check type (B is A ?)
|
// A captures B -> check type (B is A ?)
|
||||||
if aIsCapture {
|
if aIsCapture {
|
||||||
|
@ -114,7 +114,7 @@ func (server *Server) collide() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// B captures A -> check type (A is B ?)
|
// B captures A -> check type (A is B ?)
|
||||||
} else {
|
} else if bIsCapture {
|
||||||
input, exists := bService.Input[bPart]
|
input, exists := bService.Input[bPart]
|
||||||
|
|
||||||
// fail if no type or no validator
|
// fail if no type or no validator
|
||||||
|
|
Loading…
Reference in New Issue