{"record":{"id":"93417657e010ea8e","repo":"denoland/deno","slug":"missing-parameter-name-at","errorCode":null,"errorMessage":"Missing parameter name at {}","messagePattern":"Missing parameter name at (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/lsp/path_to_regex.rs","lineNumber":125,"sourceCode":"        });\n        index += 1;\n      }\n      Some(':') => {\n        let mut name = String::new();\n        while let Some(c) = chars.peek() {\n          if (*c >= '0' && *c <= '9')\n            || (*c >= 'A' && *c <= 'Z')\n            || (*c >= 'a' && *c <= 'z')\n            || *c == '_'\n          {\n            let ch = chars.next().unwrap();\n            name.push(ch);\n          } else {\n            break;\n          }\n        }\n        if name.is_empty() {\n          return Err(anyhow!(\"Missing parameter name at {}\", index));\n        }\n        let name_len = name.len();\n        tokens.push(LexToken {\n          token_type: TokenType::Name,\n          index,\n          value: name,\n        });\n        index += 1 + name_len;\n      }\n      Some('(') => {\n        let mut count = 1;\n        let mut pattern = String::new();\n\n        if chars.peek() == Some(&'?') {\n          return Err(anyhow!(\n            \"Pattern cannot start with \\\"?\\\" at {}.\",\n            index + 1\n          ));","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/cli/lsp/path_to_regex.rs#L107-L143","documentation":"In the same lexer (cli/lsp/path_to_regex.rs:125), after an opening '{' the parser reads [0-9A-Za-z_] characters as the parameter name. If none are consumed the name is empty and it fails with \"Missing parameter name at {index}\" — the schema used a parameter placeholder with no name, like \"{}\" or \"{$}\".","triggerScenarios":"A schema containing an empty placeholder: \"/x/{}/mod.ts\"; a '{' immediately followed by a non-identifier character like '-' or '.'; unbalanced braces from a broken template render.","commonSituations":"Template engines substituting an empty variable into {var}; copy-paste of path-to-regexp v6 syntax into a config that expects named groups; typos like {package } with a space (space is not an identifier char, so name stays empty).","solutions":["Name the parameter: \"/x/{package}/mod.ts\"","If the braces are literal, escape them or remove them from the schema","Ensure any templating that fills {name} placeholders never emits an empty name"],"exampleFix":"// before\n{ \"schema\": \"/x/{}/mod.ts\" }\n\n// after\n{ \"schema\": \"/x/{package}/mod.ts\" }","handlingStrategy":"validation","validationCode":"function hasEmptyPlaceholder(s: string): boolean {\n  return /\\{[^A-Za-z0-9_}\\s]/.test(s) || /\\{\\}/.test(s);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always name placeholders: {package}, {version}","Escape literal braces in schemas","Validate rendered templates so empty substitutions fail loudly at build time"],"tags":["lsp","registry","schema","lexer"],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}