Also generate docs with new sataset functions
This commit is contained in:
parent
532909d0d4
commit
2fda3e3410
3 changed files with 18 additions and 11 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import { EducationType } from "@/education/education.types";
|
import { EducationType } from "@/education/education.types";
|
||||||
import { DocumentBuilder } from "@nestjs/swagger";
|
import { DocumentBuilder } from "@nestjs/swagger";
|
||||||
import { RedocOptions } from "@juicyllama/nestjs-redoc";
|
import { RedocOptions } from "@juicyllama/nestjs-redoc";
|
||||||
import { getEducationData } from "@/education/getEducationData";
|
import educationDataset from "@/education/education.dataset";
|
||||||
|
|
||||||
const formatEducation = (education: EducationType) => {
|
const formatEducation = (education: EducationType) => {
|
||||||
const period = `${formatDate(education.startDate)} - ${
|
const period = `${formatDate(education.startDate)} - ${
|
||||||
|
|
@ -50,7 +50,10 @@ export const addEducation = (
|
||||||
redocOptions.tagGroups.push(educationTagGroup);
|
redocOptions.tagGroups.push(educationTagGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
getEducationData.slice(0, count).forEach((education) => {
|
educationDataset
|
||||||
|
.getData()
|
||||||
|
.slice(0, count)
|
||||||
|
.forEach((education) => {
|
||||||
educationTagGroup.tags.push(education.institute);
|
educationTagGroup.tags.push(education.institute);
|
||||||
document.addTag(education.institute, formatEducation(education));
|
document.addTag(education.institute, formatEducation(education));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { ExperienceType } from "@/experiences/experiences.types";
|
import { ExperienceType } from "@/experiences/experiences.types";
|
||||||
import { DocumentBuilder } from "@nestjs/swagger";
|
import { DocumentBuilder } from "@nestjs/swagger";
|
||||||
import { RedocOptions } from "@juicyllama/nestjs-redoc";
|
import { RedocOptions } from "@juicyllama/nestjs-redoc";
|
||||||
import { experiencesDataset } from "@/experiences/experiences.dataset";
|
import experiencesDataset from "@/experiences/experiences.dataset";
|
||||||
|
|
||||||
const formatExperience = (experience: ExperienceType) => {
|
const formatExperience = (experience: ExperienceType) => {
|
||||||
const workPeriod = `${formatDate(experience.startDate)} - ${
|
const workPeriod = `${formatDate(experience.startDate)} - ${
|
||||||
|
|
@ -50,7 +50,10 @@ export const addExperiences = (
|
||||||
redocOptions.tagGroups.push(experienceTagGroup);
|
redocOptions.tagGroups.push(experienceTagGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
experiencesDataset.slice(0, count).forEach((experience) => {
|
experiencesDataset
|
||||||
|
.getData()
|
||||||
|
.slice(0, count)
|
||||||
|
.forEach((experience) => {
|
||||||
experienceTagGroup.tags.push(experience.name);
|
experienceTagGroup.tags.push(experience.name);
|
||||||
document.addTag(experience.name, formatExperience(experience));
|
document.addTag(experience.name, formatExperience(experience));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { DocumentBuilder } from "@nestjs/swagger";
|
import { DocumentBuilder } from "@nestjs/swagger";
|
||||||
import { RedocOptions } from "@juicyllama/nestjs-redoc";
|
import { RedocOptions } from "@juicyllama/nestjs-redoc";
|
||||||
import { skillsDataset } from "@/skills/skills.dataset";
|
import skillsDataset from "@/skills/skills.dataset";
|
||||||
|
|
||||||
export const addSkills = (
|
export const addSkills = (
|
||||||
document: DocumentBuilder,
|
document: DocumentBuilder,
|
||||||
|
|
@ -19,6 +19,7 @@ export const addSkills = (
|
||||||
|
|
||||||
const intro = "A short excerpt of my skills are";
|
const intro = "A short excerpt of my skills are";
|
||||||
const skillList = skillsDataset
|
const skillList = skillsDataset
|
||||||
|
.getData()
|
||||||
.slice(0, count)
|
.slice(0, count)
|
||||||
.reduce((list, skill) => list.concat(`<li><strong>${skill.name}</strong> ${skill.description}</li>`), "");
|
.reduce((list, skill) => list.concat(`<li><strong>${skill.name}</strong> ${skill.description}</li>`), "");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue