Skip to content

Commit bdd9173

Browse files
authored
Merge pull request #56 from joshuatz/v1-schema
v1.0.0 JSON Schema Update
2 parents 6284716 + 5e4e8f8 commit bdd9173

8 files changed

+117
-113
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ webstore-zips
66
!build/.gitignore
77
scratch
88
*.pem
9-
*.crx
9+
*.crx
10+
.DS_Store

browser-ext/popup.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
<div class="specSelectWrapper">
3030
Select JSONResume version:
3131
<select id="specSelect">
32-
<option value="stable" selected>Stable (v0.0.16)</option>
33-
<option value="latest">Latest (v0.1.3)</option>
34-
<option value="beta">Beta (v0.1.3 + extra)</option>
32+
<option value="legacy">Legacy (v0.0.16)</option>
33+
<option value="stable" selected>Stable (v1.0.0)</option>
34+
<option value="beta">Currently even with stable (v1.0.0)</option>
3535
</select>
3636
</div>
3737
</div>

browser-ext/popup.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const STORAGE_KEYS = {
1111
};
1212
const SPEC_SELECT = /** @type {HTMLSelectElement} */ (document.getElementById('specSelect'));
1313
/** @type {SchemaVersion[]} */
14-
const SPEC_OPTIONS = ['beta', 'stable', 'latest'];
14+
const SPEC_OPTIONS = ['legacy', 'stable', 'beta'];
1515
/** @type {HTMLSelectElement} */
1616
const LANG_SELECT = document.querySelector('.langSelect');
1717

global.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {ResumeSchemaStable as _ResumeSchemaStable} from './jsonresume.schema.stable';
2-
import {ResumeSchemaLatest as _ResumeSchemaLatest, ResumeSchemaBeyondSpec as _ResumeSchemaBeyondSpec} from './jsonresume.schema.latest';
1+
import {ResumeSchemaLegacy as _ResumeSchemaLegacy} from './jsonresume.schema.legacy';
2+
import {ResumeSchemaStable as _ResumeSchemaStable, ResumeSchemaBeyondSpec as _ResumeSchemaBeyondSpec} from './jsonresume.schema.latest';
33

44
declare global {
55
interface GenObj {
@@ -138,9 +138,9 @@ declare global {
138138
}
139139
}
140140

141-
type SchemaVersion = 'stable' | 'latest' | 'beta';
141+
type SchemaVersion = 'legacy' | 'stable' | 'beta';
142142

143+
type ResumeSchemaLegacy = _ResumeSchemaLegacy;
143144
type ResumeSchemaStable = _ResumeSchemaStable;
144-
type ResumeSchemaLatest = _ResumeSchemaLatest;
145145
type ResumeSchemaBeyondSpec = _ResumeSchemaBeyondSpec;
146146
}

jsonresume.schema.latest.ts

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
/**
2-
* @file Represents the latest version of the schema that I'm willing to support / implement
3-
* - Currently locked to v0.1.3, @see https://github.com/joshuatz/linkedin-to-jsonresume/issues/33
4-
* @see https://github.com/jsonresume/resume-schema/blob/v0.1.3/schema.json
5-
* - Permalink of above: https://github.com/jsonresume/resume-schema/blob/cb54b409edd8502ec7a1c196668911985dce8bdd/schema.json
2+
* @file Represents the current version(s) of the schema
3+
* - Currently v1.0.0
4+
* @see https://github.com/jsonresume/resume-schema/blob/v1.0.0/schema.json
5+
* - Permalink of above: https://github.com/jsonresume/resume-schema/blob/8a5b3982f8e5b9f8840398e162a6e0c418d023da/schema.json
66
*/
77

88
// All of these imports are because the spec is the same for the sub-section in both stable and latest (this doc)
9-
import {Iso8601, Award, Location, Profile, Interest, Language, Reference, Skill, ResumeSchemaStable} from './jsonresume.schema.stable';
9+
import {Iso8601, Award, Location, Profile, Interest, Language, Reference, Skill, ResumeSchemaLegacy} from './jsonresume.schema.legacy';
10+
1011
// Re-export
1112
export {
1213
Iso8601,
@@ -19,13 +20,11 @@ export {
1920
Skill
2021
}
2122

22-
// Not yet in stable
23-
// https://github.com/jsonresume/resume-schema/pull/340
24-
interface Certificate {
23+
export interface Certificate {
2524
/**
2625
* e.g. Certified Kubernetes Administrator
2726
*/
28-
title: string;
27+
name: string;
2928
/**
3029
* e.g. 1989-06-12
3130
*/
@@ -86,7 +85,7 @@ export interface Education {
8685
/**
8786
* grade point average, e.g. 3.67/4.0
8887
*/
89-
gpa?: string;
88+
score?: string;
9089
/**
9190
* e.g. Massachusetts Institute of Technology
9291
*/
@@ -157,14 +156,14 @@ export interface Project {
157156
url?: string;
158157
}
159158

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

167-
export type Volunteer = Omit<ResumeSchemaStable['volunteer'][0], 'website'> & {
166+
export type Volunteer = Omit<ResumeSchemaLegacy['volunteer'][0], 'website'> & {
168167
/**
169168
* e.g. https://www.eff.org/
170169
*/
@@ -204,7 +203,7 @@ export interface Work {
204203
url?: string;
205204
}
206205

207-
export interface ResumeSchemaLatest {
206+
export interface ResumeSchemaStable {
208207
/**
209208
* link to the version of the schema that can validate the resume
210209
*/
@@ -214,6 +213,7 @@ export interface ResumeSchemaLatest {
214213
*/
215214
awards?: Award[];
216215
basics?: Basics;
216+
certificates: Certificate[];
217217
education?: Education[];
218218
interests?: Interest[];
219219
/**
@@ -244,6 +244,7 @@ export interface ResumeSchemaLatest {
244244
work?: Work[];
245245
}
246246

247-
export interface ResumeSchemaBeyondSpec extends ResumeSchemaLatest {
248-
certificates: Certificate[];
249-
}
247+
/**
248+
* Currently even - nothing beyond v1
249+
*/
250+
export interface ResumeSchemaBeyondSpec extends ResumeSchemaStable {}

jsonresume.schema.stable.ts jsonresume.schema.legacy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export interface Work {
258258
website?: string;
259259
}
260260

261-
export interface ResumeSchemaStable {
261+
export interface ResumeSchemaLegacy {
262262
/**
263263
* Specify any awards you have received throughout your professional career
264264
*/

0 commit comments

Comments
 (0)