Skip to content

Commit

Permalink
Merge pull request #56 from joshuatz/v1-schema
Browse files Browse the repository at this point in the history
v1.0.0 JSON Schema Update
  • Loading branch information
joshuatz authored Oct 31, 2021
2 parents 6284716 + 5e4e8f8 commit bdd9173
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 113 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ webstore-zips
!build/.gitignore
scratch
*.pem
*.crx
*.crx
.DS_Store
6 changes: 3 additions & 3 deletions browser-ext/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<div class="specSelectWrapper">
Select JSONResume version:
<select id="specSelect">
<option value="stable" selected>Stable (v0.0.16)</option>
<option value="latest">Latest (v0.1.3)</option>
<option value="beta">Beta (v0.1.3 + extra)</option>
<option value="legacy">Legacy (v0.0.16)</option>
<option value="stable" selected>Stable (v1.0.0)</option>
<option value="beta">Currently even with stable (v1.0.0)</option>
</select>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion browser-ext/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const STORAGE_KEYS = {
};
const SPEC_SELECT = /** @type {HTMLSelectElement} */ (document.getElementById('specSelect'));
/** @type {SchemaVersion[]} */
const SPEC_OPTIONS = ['beta', 'stable', 'latest'];
const SPEC_OPTIONS = ['legacy', 'stable', 'beta'];
/** @type {HTMLSelectElement} */
const LANG_SELECT = document.querySelector('.langSelect');

Expand Down
8 changes: 4 additions & 4 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ResumeSchemaStable as _ResumeSchemaStable} from './jsonresume.schema.stable';
import {ResumeSchemaLatest as _ResumeSchemaLatest, ResumeSchemaBeyondSpec as _ResumeSchemaBeyondSpec} from './jsonresume.schema.latest';
import {ResumeSchemaLegacy as _ResumeSchemaLegacy} from './jsonresume.schema.legacy';
import {ResumeSchemaStable as _ResumeSchemaStable, ResumeSchemaBeyondSpec as _ResumeSchemaBeyondSpec} from './jsonresume.schema.latest';

declare global {
interface GenObj {
Expand Down Expand Up @@ -138,9 +138,9 @@ declare global {
}
}

type SchemaVersion = 'stable' | 'latest' | 'beta';
type SchemaVersion = 'legacy' | 'stable' | 'beta';

type ResumeSchemaLegacy = _ResumeSchemaLegacy;
type ResumeSchemaStable = _ResumeSchemaStable;
type ResumeSchemaLatest = _ResumeSchemaLatest;
type ResumeSchemaBeyondSpec = _ResumeSchemaBeyondSpec;
}
33 changes: 17 additions & 16 deletions jsonresume.schema.latest.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/**
* @file Represents the latest version of the schema that I'm willing to support / implement
* - Currently locked to v0.1.3, @see https://github.com/joshuatz/linkedin-to-jsonresume/issues/33
* @see https://github.com/jsonresume/resume-schema/blob/v0.1.3/schema.json
* - Permalink of above: https://github.com/jsonresume/resume-schema/blob/cb54b409edd8502ec7a1c196668911985dce8bdd/schema.json
* @file Represents the current version(s) of the schema
* - Currently v1.0.0
* @see https://github.com/jsonresume/resume-schema/blob/v1.0.0/schema.json
* - Permalink of above: https://github.com/jsonresume/resume-schema/blob/8a5b3982f8e5b9f8840398e162a6e0c418d023da/schema.json
*/

// All of these imports are because the spec is the same for the sub-section in both stable and latest (this doc)
import {Iso8601, Award, Location, Profile, Interest, Language, Reference, Skill, ResumeSchemaStable} from './jsonresume.schema.stable';
import {Iso8601, Award, Location, Profile, Interest, Language, Reference, Skill, ResumeSchemaLegacy} from './jsonresume.schema.legacy';

// Re-export
export {
Iso8601,
Expand All @@ -19,13 +20,11 @@ export {
Skill
}

// Not yet in stable
// https://github.com/jsonresume/resume-schema/pull/340
interface Certificate {
export interface Certificate {
/**
* e.g. Certified Kubernetes Administrator
*/
title: string;
name: string;
/**
* e.g. 1989-06-12
*/
Expand Down Expand Up @@ -86,7 +85,7 @@ export interface Education {
/**
* grade point average, e.g. 3.67/4.0
*/
gpa?: string;
score?: string;
/**
* e.g. Massachusetts Institute of Technology
*/
Expand Down Expand Up @@ -157,14 +156,14 @@ export interface Project {
url?: string;
}

export type Publication = Omit<ResumeSchemaStable['publications'][0], 'website'> & {
export type Publication = Omit<ResumeSchemaLegacy['publications'][0], 'website'> & {
/**
* e.g. http://www.computer.org.example.com/csdl/mags/co/1996/10/rx069-abs.html
*/
url?: string;
}

export type Volunteer = Omit<ResumeSchemaStable['volunteer'][0], 'website'> & {
export type Volunteer = Omit<ResumeSchemaLegacy['volunteer'][0], 'website'> & {
/**
* e.g. https://www.eff.org/
*/
Expand Down Expand Up @@ -204,7 +203,7 @@ export interface Work {
url?: string;
}

export interface ResumeSchemaLatest {
export interface ResumeSchemaStable {
/**
* link to the version of the schema that can validate the resume
*/
Expand All @@ -214,6 +213,7 @@ export interface ResumeSchemaLatest {
*/
awards?: Award[];
basics?: Basics;
certificates: Certificate[];
education?: Education[];
interests?: Interest[];
/**
Expand Down Expand Up @@ -244,6 +244,7 @@ export interface ResumeSchemaLatest {
work?: Work[];
}

export interface ResumeSchemaBeyondSpec extends ResumeSchemaLatest {
certificates: Certificate[];
}
/**
* Currently even - nothing beyond v1
*/
export interface ResumeSchemaBeyondSpec extends ResumeSchemaStable {}
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export interface Work {
website?: string;
}

export interface ResumeSchemaStable {
export interface ResumeSchemaLegacy {
/**
* Specify any awards you have received throughout your professional career
*/
Expand Down
Loading

0 comments on commit bdd9173

Please sign in to comment.