refactor: PDF filenames with_skills → with-skills (cosmetic only)
Changed PDF filename format to use hyphens instead of underscores for consistency with other filename components, while keeping API parameter as `version=with_skills`. ## Changes **Backend:** - internal/handlers/cv.go: Add underscore-to-hyphen conversion in filename generation - New logic: `strings.ReplaceAll(version, "_", "-")` for filename only - API parameter unchanged: still accepts `version=with_skills` **Tests:** - internal/handlers/pdf_test.go: Update expected filenames to use hyphens - cv-*-with_skills-*.pdf → cv-*-with-skills-*.pdf **Documentation:** - Updated all PDF filename references to use hyphens - PDF-EXPORT-FEATURE.md - doc/LONG-PDF-GENERATION.md - PDF-VALIDATION-REPORT.md (new validation report) **PDFs:** - Regenerated all 8 PDFs with new naming convention - Old: cv-short-with_skills-jamr-2025-en.pdf - New: cv-short-with-skills-jamr-2025-en.pdf ## Examples API calls unchanged: - GET /export/pdf?version=with_skills (still works) Generated filenames: - cv-short-with-skills-jamr-2025-en.pdf ✓ - cv-long-with-skills-jamr-2025-es.pdf ✓ **Tests:** All passing ✓ **API:** Backwards compatible ✓
This commit is contained in:
@@ -178,12 +178,12 @@ func TestExportPDF_FilenameGeneration(t *testing.T) {
|
||||
"length": "long",
|
||||
"version": "with_skills",
|
||||
},
|
||||
expectedFilename: "CV-Juan-Andrés-Moreno-Rubio-es-long-with_skills.pdf",
|
||||
expectedFilename: "CV-Juan-Andrés-Moreno-Rubio-es-long-with-skills.pdf",
|
||||
},
|
||||
{
|
||||
name: "Defaults (en, short, with_skills)",
|
||||
params: map[string]string{},
|
||||
expectedFilename: "CV-Juan-Andrés-Moreno-Rubio-en-short-with_skills.pdf",
|
||||
expectedFilename: "CV-Juan-Andrés-Moreno-Rubio-en-short-with-skills.pdf",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user