This is simple REST API developed with Spring Boot which allows transactions on taboo cards.

Overview

Taboo Cards REST API with Spring Boot

Summary:

This is simple REST API developed with Spring Boot which allows transactions on taboo cards.

Requirements:

  • Java (JDK 17 used)
  • PostgreSQL (Version 14 used)
  • Intellij IDE (Recommended)

JSON Format:

{
    "word": "Hece",
    "forbidden": ["Kelime", "Harf", "Ses", "Okumak", "Yazı"]
}

Note: Example JSON file can found in src/main/resources/static/words.json.


Endpoints Table:

Request URL Description HTTP
/getCardById/{id} Returns the card that matches the id. GET
/getCard/{word} Returns the card that matches the word. GET
/getRandomCard Returns a random card. GET
/getCards Returns all cards. GET
/addCard Add card to database. If card already exist in the database, it will be updated with new values. POST
/addCards Add card list to database. If any card in the list already exist in the database, this card will be updated with new values. POST
/updateCardById/{id} Update the card that matches the id. PUT
/updateCard/{word} Update the card that matches the word. PUT
/deleteCardById/{id} Delete the card that matches the id. DELETE
/deleteCard/{word} Delete the card that matches the word. DELETE
/deleteCards Delete all cards. DELETE

Example GET Request:

Request: /getCard/Avize

Response: 200 - OK

Response Body:

{
    "id": 3,
    "word": "Avize",
    "forbidden" : ["Lamba", "Kristal", "Tavan", "Işık", "Aydınlık"]
}

Example POST Request:

Request: /addCards

Request Body:

[
	{

	"word": "Tiyatro",

	"forbidden" : ["Oyuncu", "Sahne", "Perde", "Oyun", "Suflör"]

	},

	{

	"word": "Kedi",

	"forbidden" : ["Pati", "Fare", "Tüy", "Kuyruk", "Hayvan"]

	}
]

Response: 201 - CREATED

Response Body:

[
	{
	"id": 1,

	"word": "Tiyatro",

	"forbidden" : ["Oyuncu", "Sahne", "Perde", "Oyun", "Suflör"]

	},

	{
	"id": 2,

	"word": "Kedi",

	"forbidden" : ["Pati", "Fare", "Tüy", "Kuyruk", "Hayvan"]

	}
]

Alperen Cubuk

You might also like...

The Quotation Management application is a API REST created using Spring Boot framework.

The Quotation Management application is a API REST  created using Spring Boot framework.

✅ Quotation Management API - Done ✅ About • Features • Setup • Technologies • Author • License 💻 About The Quotation Management application is a API

Apr 29, 2022

Spring Boot REST API authentication best practices using JWT

 Spring Boot REST API authentication best practices using JWT

Spring Boot REST API authentication best practices using JWT Token based API authentication with Spring Security and JWT (JSON web Token) Overview Thi

Oct 27, 2022

Spring Boot Rest API unit test with Junit 5, Mockito, Maven

Spring Boot Rest API unit testing with Junit 5, Mockito, Maven Apply Spring Boot @WebMvcTest for Rest Controller Unit Test with JUnit 5 and Mockito. F

Nov 29, 2022

Web-based restaurant management system with spring boot and rest API for school final-year project.

Restaurant Management System Developing this for my school as first final year project. It shall be able to handle most of the challanges that encount

Mar 10, 2022

Warehouse management REST API with Java & Spring Boot

Warehouse management REST API with Java & Spring Boot

Spring Warehouse Spring Warehouse is a Java Spring Boot REST API that has the purpose of managing products and articles in your warehouse. This projec

Oct 30, 2022

Spring-boot project using open-api, docker, maven, REST

library-service spring-boot project using open-api, docker, maven, REST I used docker to run the project, as well as open-api to generate basic GET an

May 6, 2022

Drone - A service via REST API that allows clients to communicate with drones

Drone - A service via REST API that allows clients to communicate with drones (i.e. **dispatch controller**). The specific communication with the drone is outside the scope of this task.

Jan 10, 2022

A blockchain system to manage monetary transactions between the different nodes of a decentralized network.

A blockchain system to manage monetary transactions between the different nodes of a decentralized network.

Blockchain under a clear vision A blockchain system to manage monetary transactions between the different nodes of a decentralized network. Authors @s

Jun 9, 2022

Rate limiting private REST APIs using Java Spring-boot, spring-security and bucket4j

Rate limiting REST APIs using Spring-security filter and Bucket4J Deployed Application (Swagger-ui on heroku) Inspired from: Baeldung Article Applicat

Jul 18, 2022
Owner
Alperen Çubuk
Software Engineer 💻
Alperen Çubuk
该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的线上博客项目/企业大型商城系统/前后端分离实践项目等,摆脱各种 hello world 入门案例的束缚,真正的掌握 Spring Boot 开发。

Spring Boot Projects 该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的前

十三 4.4k Nov 30, 2022
Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login example with Spring Security, MySQL and JWT Appropriate Flow for User Login and Registration with JWT Spring Boot Rest Api Architect

null 50 Dec 2, 2022
Spring REST API for financial management, developed with Java 11, JWT for authentication, JUnit for unit testing and Oracle Database

control_financial Spring REST API for financial management, developed with Java 11, JWT for authentication, JUnit for unit testing and Oracle Database

Vinicius Cassaro 1 May 27, 2022
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.7k Dec 4, 2022
How to configure Replica Set with Embedded Mongo using Spring Boot and Flapdoodle for unit testing code that uses mongodb transactions

Spring Boot Embedded Mongo with Replica Set This project defines a basic rest service that allows users to update records of a Person (name and email)

Divyansh Shekhar Gaur 4 Nov 1, 2022
Spring Boot JdbcTemplate example with SQL Server: CRUD Rest API using Spring Data JDBC, Spring Web MVC

Spring Boot JdbcTemplate example with SQL Server: Build CRUD Rest API Build a Spring Boot CRUD Rest API example that uses Spring Data Jdbc to make CRU

null 6 Oct 25, 2022
See how simple it is to build a REST API with a database using Java and Spring Boot

Seu primeiro projeto Java Web no Spring Boot 2022 Veja como é simples construir uma API REST com banco de dados usando Java e Spring Boot Realização D

DevSuperior 74 Nov 26, 2022
Spring JPA Many To Many example with Hibernate and Spring Boot CRUD Rest API - ManyToMany annotation

Spring JPA Many To Many example with Hibernate and Spring Boot CRUD Rest API - ManyToMany annotation

null 18 Nov 9, 2022
Applied Spring Data JPA technologies including mapping, connecting real DB, Hibernate, Queries, Paging & Sorting, various Relationships, Transactions

University Management In this project, I practiced & applied Spring Data JPA technologies including mapping, connecting real DB, Hibernate, Queries, P

SarvarKhalimov 2 Sep 5, 2022
This project contains a full example of an application developed using Spring Boot and GraphQL within the Java.

Spring boot GraphQL Example This project contains a full example of an application developed using GraphQL within the Java. The project includes a com

Haoqiao Wang 3 Jul 20, 2022