This project contains the submission for Adobe PapyrusNebula Hackathon Round 2.
For building and running the application you need:
- Using credentials from
pdfservices-api-credentials.json
set environment variables PDF_SERVICES_CLIENT_ID and PDF_SERVICES_CLIENT_SECRET. - To run the application execute the main method in
src/main/java/com/example/restdemo/RestDemoApplication.java
. - Open Postman or command prompt and run the sample curl command present in
ResumeBuilder Curl Request
. - Change the values as per your requirements.
- There are 3 different types of templates available(1, 2 and 3). You can choose any one of them by simply changing template_id in post request.
com.example.restdemo.controller
package contains the code to process the incoming API requests.com.example.restdemo.create
package contains two files:GeneratePDF.java
generates resume in the pdf format from the specified template and input raw json data.GenerateJSON.java
generates the converts the input raw json data into the desired json format.
com.example.restdemo.exception
package contains the custom exception handling files.BadRequestException.java
for handling Bad Request errors(400).UnauthorizedException.java
for handling Unauthorised access errors(401).TemplateNotFoundException.java
for handling Template Not Found error(404).InternalServerErrorException.java
for handling Internal Server errors(500).ResumeBuilderAPIException.java
is a class to represent the desired error details.ResumeBuilderAPIExceptionHandler.java
is a class to handle the exception and return a custom error response.
RestDemoApplication.java
contains the main method to run the application.src/main/resources/templates
directory contains the resume templates.src/main/resources/generated
directory is for storing the json data and the generated resume pdf file.