grpc-ecosystem/grpc-gateway · error
unknown repeated path parameter separator: %s
Error message
unknown repeated path parameter separator: %s
What it means
SetRepeatedPathParamSeparator configures how repeated path parameters are serialized in URL templates. Only 'csv', 'pipes', 'ssv', and 'tsv' are accepted; any other name returns this error because the separator character is unknown.
Source
Thrown at internal/descriptor/registry.go:581
func (r *Registry) GetRepeatedPathParamSeparatorName() string {
return r.repeatedPathParamSeparator.name
}
// SetRepeatedPathParamSeparator sets how path parameter repeated fields are
// separated. Allowed names are 'csv', 'pipe', 'ssv' and 'tsv'.
func (r *Registry) SetRepeatedPathParamSeparator(name string) error {
var sep rune
switch name {
case "csv":
sep = ','
case "pipes":
sep = '|'
case "ssv":
sep = ' '
case "tsv":
sep = '\t'
default:
return fmt.Errorf("unknown repeated path parameter separator: %s", name)
}
r.repeatedPathParamSeparator = repeatedFieldSeparator{
name: name,
sep: sep,
}
return nil
}
// SetUseJSONNamesForFields sets useJSONNamesForFields
func (r *Registry) SetUseJSONNamesForFields(use bool) {
r.useJSONNamesForFields = use
}
// GetUseJSONNamesForFields returns useJSONNamesForFields
func (r *Registry) GetUseJSONNamesForFields() bool {
return r.useJSONNamesForFields
}
View on GitHub (pinned to a58a4436a3)
Solutions
- Use one of the supported names: 'csv', 'pipes', 'ssv', or 'tsv'
- Fix the spelling of the flag value in your generation script/Makefile
- Check tooling docs for the exact accepted strings and their case
Example fix
// before
reg.SetRepeatedPathParamSeparator("pipe")
// after
reg.SetRepeatedPathParamSeparator("pipes") Defensive patterns
Strategy: validation
Validate before calling
var validSeparators = map[string]bool{"csv": true, "pipes": true, "ssv": true, "tsv": true}
if !validSeparators[name] {
return fmt.Errorf("separator must be one of csv|pipes|ssv|tsv, got %q", name)
}
err := reg.SetRepeatedPathParamSeparator(name) Prevention
- Centralize the separator string in one constant rather than scattering flag literals
- Validate CLI flag values against an allowlist before calling the API
- Add a unit test covering each accepted separator name
When it happens
Trigger: Calling Registry.SetRepeatedPathParamSeparator(name) with a name outside the allowed set; via applyFlags when a CLI flag supplies a misspelled or unsupported separator name.
Common situations: Typo in generator flag (e.g. 'pipe' instead of 'pipes', 'comma' instead of 'csv'); copying flags from another tool that uses different separator vocabulary; uppercase input that is not normalized.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- selector %q in %v must specify a single service method witho
- package name %s is already taken. Use another alias
- no file %s found
- no method %s found
- no message %s found
AI-assisted analysis of grpc-ecosystem/grpc-gateway@a58a4436a3 (2026-09-02).
Data as JSON: /api/errors/cf1b515e072ce7c8.
Report an issue: GitHub.