SanitizedParamName returns the parameter name sanitized to be a valid Go identifier. This is needed for routers like net/http's ServeMux where path wildcards (e.g. {name}) must be valid Go identifiers. For the original OpenAPI parameter name (e.g. for error messages or JSON tags), use ParamName.
()
| 196 | // wildcards (e.g. {name}) must be valid Go identifiers. For the original |
| 197 | // OpenAPI parameter name (e.g. for error messages or JSON tags), use ParamName. |
| 198 | func (pd ParameterDefinition) SanitizedParamName() string { |
| 199 | return SanitizeGoIdentifier(pd.ParamName) |
| 200 | } |
| 201 | |
| 202 | func (pd ParameterDefinition) GoVariableName() string { |
| 203 | name := LowercaseFirstCharacters(pd.GoName()) |
nothing calls this directly
no test coverage detected