Skip to content

Students-api is a micro service project build using Spring Boot and Open API Spec 3.0.0 with API First Design approach. The service uses mongo-db as storage and can be deployed using Docker, Kubernetes or Helm chart.

Notifications You must be signed in to change notification settings

sainik73/students-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to students-api

This repository shows the working example of how to design and build an API using the API First Design approach. The Design First approach advocates for designing the API's contract first before writing any implementation/code.

Summary

Open API spec File 'students-api.yaml' [located under 'src/main/resources']

Any modification to students-api.yaml file, necessitates the build of the project as per below instructions to regenerate the API and Model classes. This is done using the swagger-codegen-maven-plugin. REST Controller 'StudentsApiController' consumes these generated classes.

Version

  • v0.1: Initial version with mocked api response
  • v1.0: The repository now supports Mongo DB as storage. students-api repository connects to Mongo DB, which is run as a Docker container. Java Logs (students-api-logger.log) are created under project root/logs directory.

Instructions

  1. Clone this repository:

git clone https://github.com/sainik73/students-api

  1. Run Mongo docker instance by following instructions in mongo-data\RunMongo.txt file
  2. Build the project with Maven:
cd students-api/
mvn clean install
  1. Run the spring boot application 'StudentsApplication'
  2. Test the application using postman Run in Postman

About

Students-api is a micro service project build using Spring Boot and Open API Spec 3.0.0 with API First Design approach. The service uses mongo-db as storage and can be deployed using Docker, Kubernetes or Helm chart.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published