wip: add api auth and /resume endpoint
This commit is contained in:
parent
22e2f6005f
commit
2c6d063717
28 changed files with 2486 additions and 271 deletions
228
apischema/openapi.yaml
Normal file
228
apischema/openapi.yaml
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
openapi: 3.1.0
|
||||
info:
|
||||
contact:
|
||||
email: catalin@roboces.dev
|
||||
name: cătălin
|
||||
license:
|
||||
name: GNU General Public License v3.0 or later
|
||||
identifier: GPL-3.0-or-later
|
||||
title: CVVV
|
||||
description: JSON Resume Schema Explorer
|
||||
version: 0.1.0
|
||||
servers:
|
||||
- url: 'https://cvvvvv.roboces.dev/api/v1'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
paths:
|
||||
/ping:
|
||||
get:
|
||||
summary: Healthcheck
|
||||
description: Check if the server is alive
|
||||
operationId: getPing
|
||||
responses:
|
||||
'200':
|
||||
description: Ping
|
||||
content:
|
||||
schema:
|
||||
type: string
|
||||
example: pong
|
||||
/usage:
|
||||
get:
|
||||
summary: Get usage
|
||||
description: Show usage instructions
|
||||
operationId: getUsage
|
||||
responses:
|
||||
'200':
|
||||
description: Usage
|
||||
content:
|
||||
schema:
|
||||
type: string
|
||||
example: pong
|
||||
/resume:
|
||||
get:
|
||||
summary: Get resume
|
||||
description: Retrieve the full JSON resume
|
||||
operationId: getResume
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Resume
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json
|
||||
/resume/basics:
|
||||
get:
|
||||
summary: Get basics
|
||||
description: Retrieve the basics section from the JSON resume
|
||||
operationId: getResumeBasics
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Resume basics
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json#/properties/basics
|
||||
/resume/work:
|
||||
get:
|
||||
summary: Get work
|
||||
description: Retrieve the work section from the JSON resume
|
||||
operationId: getResumeWork
|
||||
security:
|
||||
- ApiKeyAuth
|
||||
responses:
|
||||
'200':
|
||||
description: Resume work
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json#/properties/work
|
||||
/resume/volunteer:
|
||||
get:
|
||||
summary: Get volunteer
|
||||
description: Retrieve the volunteer section from the JSON resume
|
||||
operationId: getResumeVolunteer
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Resume volunteer
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json#/properties/volunteer
|
||||
/resume/education:
|
||||
get:
|
||||
summary: Get education
|
||||
description: Retrieve the education section from the JSON resume
|
||||
operationId: getResumeEducation
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Resume education
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json#/properties/education
|
||||
/resume/awards:
|
||||
get:
|
||||
summary: Get awards
|
||||
description: Retrieve the awards section from the JSON resume
|
||||
operationId: getResumeAwards
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Resume awards
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json#/properties/awards
|
||||
/resume/certificates:
|
||||
get:
|
||||
summary: Get certificates
|
||||
description: Retrieve the certificates section from the JSON resume
|
||||
operationId: getResumeCertificates
|
||||
security:
|
||||
- ApiKeyAuth
|
||||
responses:
|
||||
'200':
|
||||
description: Resume certificates
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json#/properties/certificates
|
||||
/resume/publications:
|
||||
get:
|
||||
summary: Get publications
|
||||
description: Retrieve the publications section from the JSON resume
|
||||
operationId: getResumePublications
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Resume publications
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json#/properties/publications
|
||||
/resume/skills:
|
||||
get:
|
||||
summary: Get skills
|
||||
description: Retrieve the skills section from the JSON resume
|
||||
operationId: getResumeSkills
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Resume skills
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json#/properties/skills
|
||||
/resume/languages:
|
||||
get:
|
||||
summary: Get languages
|
||||
description: Retrieve the languages section from the JSON resume
|
||||
operationId: getResumeLanguages
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Resume languages
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json#/properties/languages
|
||||
/resume/interests:
|
||||
get:
|
||||
summary: Get interests
|
||||
description: Retrieve the interests section from the JSON resume
|
||||
operationId: getResumeInterests
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Resume interests
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json#/properties/interests
|
||||
/resume/references:
|
||||
get:
|
||||
summary: Get references
|
||||
description: Retrieve the references section from the JSON resume
|
||||
operationId: getResumeReferences
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Resume references
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json#/properties/references
|
||||
/resume/projects:
|
||||
get:
|
||||
summary: Get projects
|
||||
description: Retrieve the projects section from the JSON resume
|
||||
operationId: getResumeProjects
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Resume projects
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ./resumeschema.json#/properties/projects
|
||||
components:
|
||||
securitySchemes:
|
||||
ApiKeyAuth:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: X-API-KEY
|
||||
500
apischema/resumeschema.json
Normal file
500
apischema/resumeschema.json
Normal file
|
|
@ -0,0 +1,500 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"additionalProperties": false,
|
||||
"definitions": {
|
||||
"iso8601": {
|
||||
"type": "string",
|
||||
"description": "e.g. 2014-06-29",
|
||||
"pattern": "^([1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]|[1-2][0-9]{3}-[0-1][0-9]|[1-2][0-9]{3})$"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"description": "link to the version of the schema that can validate the resume",
|
||||
"format": "uri"
|
||||
},
|
||||
"basics": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "e.g. Web Developer"
|
||||
},
|
||||
"image": {
|
||||
"type": "string",
|
||||
"description": "URL (as per RFC 3986) to a image in JPEG or PNG format"
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"description": "e.g. thomas@gmail.com",
|
||||
"format": "email"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string",
|
||||
"description": "Phone numbers are stored as strings so use any format you like, e.g. 712-117-2923"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "URL (as per RFC 3986) to your website, e.g. personal homepage",
|
||||
"format": "uri"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "Write a short 2-3 sentence biography about yourself"
|
||||
},
|
||||
"location": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"address": {
|
||||
"type": "string",
|
||||
"description": "To add multiple address lines, use \n. For example, 1234 Glücklichkeit Straße\nHinterhaus 5. Etage li."
|
||||
},
|
||||
"postalCode": {
|
||||
"type": "string"
|
||||
},
|
||||
"city": {
|
||||
"type": "string"
|
||||
},
|
||||
"countryCode": {
|
||||
"type": "string",
|
||||
"description": "code as per ISO-3166-1 ALPHA-2, e.g. US, AU, IN"
|
||||
},
|
||||
"region": {
|
||||
"type": "string",
|
||||
"description": "The general region where you live. Can be a US state, or a province, for instance."
|
||||
}
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"type": "array",
|
||||
"description": "Specify any number of social networks that you participate in",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"network": {
|
||||
"type": "string",
|
||||
"description": "e.g. Facebook or Twitter"
|
||||
},
|
||||
"username": {
|
||||
"type": "string",
|
||||
"description": "e.g. neutralthoughts"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "e.g. http://twitter.example.com/neutralthoughts",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"work": {
|
||||
"type": "array",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "e.g. Facebook"
|
||||
},
|
||||
"location": {
|
||||
"type": "string",
|
||||
"description": "e.g. Menlo Park, CA"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "e.g. Social Media Company"
|
||||
},
|
||||
"position": {
|
||||
"type": "string",
|
||||
"description": "e.g. Software Engineer"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "e.g. http://facebook.example.com",
|
||||
"format": "uri"
|
||||
},
|
||||
"startDate": {
|
||||
"$ref": "#/definitions/iso8601"
|
||||
},
|
||||
"endDate": {
|
||||
"$ref": "#/definitions/iso8601"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "Give an overview of your responsibilities at the company"
|
||||
},
|
||||
"highlights": {
|
||||
"type": "array",
|
||||
"description": "Specify multiple accomplishments",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "e.g. Increased profits by 20% from 2011-2012 through viral advertising"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"volunteer": {
|
||||
"type": "array",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"organization": {
|
||||
"type": "string",
|
||||
"description": "e.g. Facebook"
|
||||
},
|
||||
"position": {
|
||||
"type": "string",
|
||||
"description": "e.g. Software Engineer"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "e.g. http://facebook.example.com",
|
||||
"format": "uri"
|
||||
},
|
||||
"startDate": {
|
||||
"$ref": "#/definitions/iso8601"
|
||||
},
|
||||
"endDate": {
|
||||
"$ref": "#/definitions/iso8601"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "Give an overview of your responsibilities at the company"
|
||||
},
|
||||
"highlights": {
|
||||
"type": "array",
|
||||
"description": "Specify accomplishments and achievements",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "e.g. Increased profits by 20% from 2011-2012 through viral advertising"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"education": {
|
||||
"type": "array",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"institution": {
|
||||
"type": "string",
|
||||
"description": "e.g. Massachusetts Institute of Technology"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "e.g. http://facebook.example.com",
|
||||
"format": "uri"
|
||||
},
|
||||
"area": {
|
||||
"type": "string",
|
||||
"description": "e.g. Arts"
|
||||
},
|
||||
"studyType": {
|
||||
"type": "string",
|
||||
"description": "e.g. Bachelor"
|
||||
},
|
||||
"startDate": {
|
||||
"$ref": "#/definitions/iso8601"
|
||||
},
|
||||
"endDate": {
|
||||
"$ref": "#/definitions/iso8601"
|
||||
},
|
||||
"score": {
|
||||
"type": "string",
|
||||
"description": "grade point average, e.g. 3.67/4.0"
|
||||
},
|
||||
"courses": {
|
||||
"type": "array",
|
||||
"description": "List notable courses/subjects",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "e.g. H1302 - Introduction to American history"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"awards": {
|
||||
"type": "array",
|
||||
"description": "Specify any awards you have received throughout your professional career",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "e.g. One of the 100 greatest minds of the century"
|
||||
},
|
||||
"date": {
|
||||
"$ref": "#/definitions/iso8601"
|
||||
},
|
||||
"awarder": {
|
||||
"type": "string",
|
||||
"description": "e.g. Time Magazine"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "e.g. Received for my work with Quantum Physics"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"certificates": {
|
||||
"type": "array",
|
||||
"description": "Specify any certificates you have received throughout your professional career",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "e.g. Certified Kubernetes Administrator"
|
||||
},
|
||||
"date": {
|
||||
"type": "string",
|
||||
"description": "e.g. 1989-06-12",
|
||||
"format": "date"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "e.g. http://example.com",
|
||||
"format": "uri"
|
||||
},
|
||||
"issuer": {
|
||||
"type": "string",
|
||||
"description": "e.g. CNCF"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"publications": {
|
||||
"type": "array",
|
||||
"description": "Specify your publications through your career",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "e.g. The World Wide Web"
|
||||
},
|
||||
"publisher": {
|
||||
"type": "string",
|
||||
"description": "e.g. IEEE, Computer Magazine"
|
||||
},
|
||||
"releaseDate": {
|
||||
"$ref": "#/definitions/iso8601"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "e.g. http://www.computer.org.example.com/csdl/mags/co/1996/10/rx069-abs.html",
|
||||
"format": "uri"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "Short summary of publication. e.g. Discussion of the World Wide Web, HTTP, HTML."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"skills": {
|
||||
"type": "array",
|
||||
"description": "List out your professional skill-set",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "e.g. Web Development"
|
||||
},
|
||||
"level": {
|
||||
"type": "string",
|
||||
"description": "e.g. Master"
|
||||
},
|
||||
"keywords": {
|
||||
"type": "array",
|
||||
"description": "List some keywords pertaining to this skill",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "e.g. HTML"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"languages": {
|
||||
"type": "array",
|
||||
"description": "List any other languages you speak",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"language": {
|
||||
"type": "string",
|
||||
"description": "e.g. English, Spanish"
|
||||
},
|
||||
"fluency": {
|
||||
"type": "string",
|
||||
"description": "e.g. Fluent, Beginner"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"interests": {
|
||||
"type": "array",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "e.g. Philosophy"
|
||||
},
|
||||
"keywords": {
|
||||
"type": "array",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "e.g. Friedrich Nietzsche"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"references": {
|
||||
"type": "array",
|
||||
"description": "List references you have received",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "e.g. Timothy Cook"
|
||||
},
|
||||
"reference": {
|
||||
"type": "string",
|
||||
"description": "e.g. Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"projects": {
|
||||
"type": "array",
|
||||
"description": "Specify career projects",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "e.g. The World Wide Web"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "Short summary of project. e.g. Collated works of 2017."
|
||||
},
|
||||
"highlights": {
|
||||
"type": "array",
|
||||
"description": "Specify multiple features",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "e.g. Directs you close but not quite there"
|
||||
}
|
||||
},
|
||||
"keywords": {
|
||||
"type": "array",
|
||||
"description": "Specify special elements involved",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "e.g. AngularJS"
|
||||
}
|
||||
},
|
||||
"startDate": {
|
||||
"$ref": "#/definitions/iso8601"
|
||||
},
|
||||
"endDate": {
|
||||
"$ref": "#/definitions/iso8601"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "e.g. http://www.computer.org/csdl/mags/co/1996/10/rx069-abs.html"
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"description": "Specify your role on this project or in company",
|
||||
"additionalItems": false,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "e.g. Team Lead, Speaker, Writer"
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"type": "string",
|
||||
"description": "Specify the relevant company/entity affiliations e.g. 'greenpeace', 'corporationXYZ'"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": " e.g. 'volunteering', 'presentation', 'talk', 'application', 'conference'"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"description": "The schema version and any other tooling configuration lives here",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"canonical": {
|
||||
"type": "string",
|
||||
"description": "URL (as per RFC 3986) to latest version of this document",
|
||||
"format": "uri"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "A version field which follows semver - e.g. v1.0.0"
|
||||
},
|
||||
"lastModified": {
|
||||
"type": "string",
|
||||
"description": "Using ISO 8601 with YYYY-MM-DDThh:mm:ss"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"title": "Resume Schema",
|
||||
"type": "object"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue