Schema
Overview
Drafting resumes is a long, boring, and tedious process. People often need to spend hours nitpicking details, but errors still occur. For example, there may be a typo in education degrees, an email format may be wrong, a course name may be too short, etc.
Along with the static types definitions, YAMLResume provides a built-in schema which can be used for runtime validations. This is the core that makes YAMLResume a resume compiler—YAMLResume provides clang-style warning/error messages that help catch potential errors at the early stage of resume drafting.
For example, for the following resume:
# yaml-language-server: $schema=https://yamlresume.dev/schema.json
---
content:
basics:
name: Andy Dufresne
headline: Headed for the Pacific
phone: "(213) 555-9876"
email: hi@pp
url: https//ppresume.com/gallery
summary: |
- Computer Science major with strong foundation in data structures, algorithms, and software development
- Pixel perfect full stack web developer, specialised in creating high-quality, visually appealing websites
- Experiened in databases (SQL, NoSQL), familiar with server-side technologies (Node.js, Express, etc.)
- Team player, with detail-oriented mindset and a keen eye for design and user experiences
location:
address: 123 Main Street
region: California
city: S
country: United States
postalCode: "95814"
education:
- institution: University of Southern California
url: https://www.cs.usc.edu/
degree: Bachelor
area: Computer Engineering and Computer Science
score: "3.8"
startDate: Sep 1, 2016
endDate:
courses:
- D
- Programming Language Concepts
summary: |
- Developed proficiency in programming languages such as Java, C++, and Python
- Gained hands-on experience in software development through various projects and assignments
- Strong communication and teamwork skills acquired through group projects and presentations
layout:
typography:
fontSize: 13pt
yamlresume validate
will give you a list of potential errors, with clear
positional information that helps pinpoint the exact location of the error,
meanwhile, with the help of
yaml-language-server,
you can get a better editing experience with
auto-completion, on-hover property
docs, format
validation, and more.
Under the hood, YAMLResume adopts Zod to validate resume data in runtime. Zod is a TypeScript-first schema validation library that allows you to define schemas for your resume data, which acts as a robust safety net, ensuring that the resume data is reliable, consistent, and ready to be rendered into a professional PDF.
Schema validation is a very powerful tool to ensure the correctness of resume data. It can catch errors throughout the entire life cycle of resume drafting, which is very helpful to avoid low-level mistakes from the start.