Skip to content

[Bug] Broken JSON Resume Schema Importing #2273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
Shadowfita opened this issue Apr 24, 2025 · 2 comments
Open
1 task done

[Bug] Broken JSON Resume Schema Importing #2273

Shadowfita opened this issue Apr 24, 2025 · 2 comments
Assignees
Labels
bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version

Comments

@Shadowfita
Copy link

Is there an existing issue for this?

  • Yes, I have searched the existing issues and none of them match my problem.

Product Variant

Cloud (https://rxresu.me)

Current Behavior

Importing a valid JSON resume results in an error on both self-hosted and cloud, with this response:

{
    "issues": [
        {
            "code": "too_small",
            "minimum": 1,
            "type": "string",
            "inclusive": true,
            "exact": false,
            "message": "String must contain at least 1 character(s)",
            "path": [
                "data",
                "sections",
                "experience",
                "items",
                0,
                "company"
            ]
        },
        {
            "code": "too_small",
            "minimum": 1,
            "type": "string",
            "inclusive": true,
            "exact": false,
            "message": "String must contain at least 1 character(s)",
            "path": [
                "data",
                "sections",
                "experience",
                "items",
                1,
                "company"
            ]
        },
        {
            "code": "too_small",
            "minimum": 1,
            "type": "string",
            "inclusive": true,
            "exact": false,
            "message": "String must contain at least 1 character(s)",
            "path": [
                "data",
                "sections",
                "experience",
                "items",
                2,
                "company"
            ]
        },
        {
            "code": "too_small",
            "minimum": 1,
            "type": "string",
            "inclusive": true,
            "exact": false,
            "message": "String must contain at least 1 character(s)",
            "path": [
                "data",
                "sections",
                "experience",
                "items",
                3,
                "company"
            ]
        },
        {
            "code": "too_small",
            "minimum": 1,
            "type": "string",
            "inclusive": true,
            "exact": false,
            "message": "String must contain at least 1 character(s)",
            "path": [
                "data",
                "sections",
                "experience",
                "items",
                4,
                "company"
            ]
        }
    ],
    "name": "ZodError"
}

Expected Behavior

The importer/validator should recognise the accurate schema and handle the import accordingly.

Steps To Reproduce

Import a valid JSON Resume.

What browsers are you seeing the problem on?

Safari, Microsoft Edge, Chrome, Firefox

What template are you using?

None

Anything else?

Previous issue was opened in 2023 #1598 but was closed with no action. If there is no plan to support the JSON Resume schema, it should be removed as an option.

@Shadowfita Shadowfita added bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version labels Apr 24, 2025
@JaedenRotondo
Copy link

@Shadowfita The experienceSchema requires that the company field have at least one character:

export const experienceSchema = itemSchema.extend({
  company: z.string().min(1), // current enforcement that the company field must have 1 character 
  position: z.string(),
  location: z.string(),
  date: z.string(),
  summary: z.string(),
  url: urlSchema,
});

Can you post the JSON section on experience? You can remove any sensitive information. I'd like to see if the JSON is truly valid because, if I understand correctly, no company names cause this validation error.

@Shadowfita
Copy link
Author

@Shadowfita The experienceSchema requires that the company field have at least one character:

export const experienceSchema = itemSchema.extend({
company: z.string().min(1), // current enforcement that the company field must have 1 character
position: z.string(),
location: z.string(),
date: z.string(),
summary: z.string(),
url: urlSchema,
});
Can you post the JSON section on experience? You can remove any sensitive information. I'd like to see if the JSON is truly valid because, if I understand correctly, no company names cause this validation error.

Thanks for your reply. Below is a redacted example of my JSON Resume payload in the basics.work array. Every object in the work array has the same text in the 'company' field, and I receive an error for all 5 entries when attempting to import.

    {
      "title": "Principal Officer",
      "company": "Government Department",
      "location_city": " Australia",
      "employment_type": "Full-time",
      "start_date": "2022",
      "end_date": "Present",
      "responsibilities": [
        "Strategic and operational planning for the implementation of Initiatives."
      ],
      "accomplishments": [
       "Led the coordination of the pipeline with various divisions within the Department."
      ]
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version
Projects
None yet
Development

No branches or pull requests

3 participants