Giter Site home page Giter Site logo

tech-certification-api's Introduction

๐Ÿ’ป Tech Certification API ๐Ÿ’ป

A REST API that allows students to answer questions and get their certifications developed using:

  • Java
  • Spring Boot
  • Lombok
  • PostgreSQL
  • Docker

๐Ÿš€ Features

  • Register students
  • Get students by e-mail
  • Update students' e-mails
  • Register multiple choice questions for a specific technology
  • Get all questions for a technology
  • Submit answers and get certified
  • Check all details of a certification
  • Get arbitrary size rankings of certification grades for a technology

๐Ÿ How to Run

To run the application, you'll have to have JRE, Maven and Docker installed in your machine. To start the database container on port 5432, run the following command:

docker-compose up

Then, to start the application on port 8085, run the following command:

mvn spring-boot:run

To alter any of the ports, go to /docker-compose.yml and /src/main/resources/application.properties.

โš™๏ธ Behavior

All endpoints consume and produce JSON and the following documentation uses mostly YAML

/students

POST

  • Request Body
email: string
name: string
  • Response
201 - Created:
    Headers:
        Location: URI (string)
409 - Conflict:
    Body:
        error:
            code: string
            details: string
    Meaning: Email is already in use.

GET /{studentEmail}

  • Path Variable
studentEmail: string
  • Response
200 - OK:
    Body:
        email: string
        fullName: string
        certifications:
            - id: UUID (string)
            technology: string
404 - Not Found:
    Meaning: Student does not exist.

PATCH /{studentEmail}

  • Path Variable
studentEmail: string
  • Request Body
email: string
  • Response
200 - OK:
    Headers:
        Location: URI (string)
404 - Not Found:
    Meaning: Student referenced in path variable does not exist.
409 - Conflict:
    Body:
        error:
            code: string
            details: string
    Meaning: E-mail specified in request body is already in use.

/questions

POST

  • Request Body
technology: string
description: string
alternatives:
    - description: string
      correct: boolean
  • Response
201 - Created:
    Headers:
        Location: URI (string)

GET /{technology}

  • Path Variable
technology: string
  • Response
200 - OK:
    Body:
        - id: UUID (string)
          technology: string
          description: string
          alternatives:
              - id: UUID (string)
                description: string
404 - Not Found:
    Meaning: No questions found for the specified technology.

/certifications

POST

  • Request Body
email: string
technology: string
answers:
    - questionId: UUID (string)
      alternativeId: UUID (string)
  • Response
201 - Created:
    Headers:
        Location: URI (string)
404 - Not Found:
    Meaning: Either one of the resources referenced in request body (student, question and alternative) does not exist or technology, question and alternative are conflictant.

GET /{certificationId}

  • Path Variable
certificationId: string
  • Response
200 - OK:
    Body:
        id: UUID (string)
        technology: string
        grade: float
        timeOfEmition: datetime (string)
        answers:
            - question:
                  id: UUID (string)
                  description: string
              chosenAlternative:
                  id: UUID (string)
                  description: string
              correct: boolean
404 - Not Found:
    Body:
        error:
            code: string
            details: string
    Meaning: Certification does not exist.

GET /{technology}/rankings/{quantity}

  • Path Variables
technology: string
quantity: integer
  • Response
200 - OK:
    Body:
        - id: UUID (string)
          grade: float
          student:
              email: string
              name: string
404 - Not Found:
    Body:
        error:
            code: string
            details: string
    Meaning: No certifications found for the specified technology.

tech-certification-api's People

Contributors

ryansakurai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.