Code Monkey home page Code Monkey logo

fizzbuzzapi's Introduction

FizzBuzz API

FizzBuzz is an API allowing consumers to view fizzbuzzes and create them. The API provides a comprehensive platform for managing fizzbuzzes, allowing users to list all fizzbuzzes, view the details of an individual fizzbuzz, or create a new fizzbuzz. The API also offers powerful search capabilities, enabling users to find fizzbuzzes quickly and effectively.

Technologies Used

  • Java 17
  • Maven
  • Spring Boot
  • Spring Data (JPA)
  • H2 Database
  • Postman
  • Apache Tomcat
  • MockMVC
  • IntelliJ

General Approach

I started off by creating my user stories and acceptance criteria. This helped me visualize my end goals and outline what I wanted to achieve with this project. I also created a spreadsheet of all my HTTP methods and endpoints to keep track of which methods were supposed to hit which endpoint.

Finally, I created an ERD (entity relationship diagram) to plan my different models and their relevant attributes. This helped me to visualize their relationships to one another and plan out how I was going to link the corresponding tables in the database.

Entity Relationship Diagram

ERD

User Stories

User Story 1:
As a user, I want to be able to list all fizzbuzzes so that I can view all fizzbuzzes. (GET all fizzbuzzes)

Acceptance Criteria:

  • User can list all fizzbuzz objects.
  • Search results should display a list of all fizzbuzzes.

User Story 2:
As a user, I want to be able to retrieve a single fizzbuzz object so that I can view its specific details (user agent, creation date, and message). (GET individual fizzbuzz by fizzbuzz ID)

Acceptance Criteria:

  • User can retrieve a single fizzbuzz object.
  • Search results should return an exact match to the user's search criteria.

User Story 3:
As a user, I want to be able to create a new fizzbuzz object so that I can save it. (POST fizzbuzz)

Acceptance Criteria:

  • User can create a new fizzbuzz object.
  • User can save newly created fizzbuzz objects.

HTTP Endpoints

Request Type URL Functionality Access
POST /api/fizzbuzz/ Create fizzbuzz Public
GET /api/fizzbuzz/ Get all fizzbuzzes Public
GET /api/fizzbuzz/1/ Get single fizzbuzz Public

Major Hurdles

Although all my endpoints work fine in Postman with no issues, I was only able to get 2 of my 3 tests to pass when using MockMVC to test my controller. The problem lies in the test for the POST method, so I know it's just a matter of me doing more research into how to refactor the logic for one particular line in that test.

Unfortunately, I was working on a very short deadline for this project, but I do plan on continuing to work on it in order to correct this issue.

Links

Author

๐Ÿ‘ฉโ€๐Ÿ’ป Erica Ayala

fizzbuzzapi's People

Contributors

ayalavirtual 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.