Skip to content

neildiamzon/note-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Objective

Develop a simple backend for a note-taking application using either Micronaut, Spring-boot, or something similar.

Project Description

Create a RESTful API that allows users to create, retrieve, update, and delete notes. Each note can consist of a title and a body.

Specific Requirements

  1. API Endpoints: · POST /notes: Create a new note. · GET /notes: Retrieve all notes. · GET /notes/:id: Retrieve a specific note by ID. · PUT /notes/:id: Update a specific note. · DELETE /notes/:id: Delete a specific note.
  2. Data Storage: Use an in-memory array or a simple file-based solution to store notes.
  3. Data Validation: Validate input data for creating and updating notes.
  4. Error Handling: Basic error handling for common scenarios (e.g., note not found).

How to start application (you need mvn installed and jre and/or jdk)

  1. Clone repo into your local
  2. Navigate to folder containing pom.xml
  3. type command in terminal: mvn spring-boot:run

How to use application

Pre-requisite: Postman or any similar application

URL starts with "localhost:8080" as port 8080 is the default Refer to images below for sample payload:

  1. Sample image below for POST /notes -- adding a new note in the list: image
  2. Sample image below for GET /notes -- getting all the notes: image
  3. Sample image below for PUT /notes/id -- updating a specific note: image
  4. Sample image below for GET /notes/id -- retrieving a specific note:
image 5. Sample image below for DELETE /notes/id -- deleting a specific note: image

Sample errors

  1. Missing id in POST /notes: image

  2. Note not found in DELETE /notes: image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages