Giter Site home page Giter Site logo

anasoid / spring-petclinic-openapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gantsign/spring-petclinic-openapi

0.0 0.0 0.0 6.92 MB

OpenAPI Spring Boot PetClinic Demo

Shell 0.40% JavaScript 0.04% Java 60.66% TypeScript 33.20% HTML 0.27% Dockerfile 0.34% SCSS 5.09%

spring-petclinic-openapi's Introduction

OpenAPI Spring Boot PetClinic Demo

Build Status codecov

This project is a fork of the ReactJS variant of the Spring Boot PetClinic. This the primary reason for this fork is to add an OpenAPI specification for the REST API and generate the Java REST server API and TypeScript client API using the OpenAPI Generator. Several other changes were made further demonstrate best practice. The key changes are listed below:

Server changes

UI changes

General changes

All changes

View all the changes.

Prerequisites

  • Java 8
  • NodeJS 10

Building

To build run the following from the project root folder:

./build.sh

Running

Note: Spring Boot Server App must be running before starting the client!

To start the server, launch a Terminal and run from the project's root folder:

./gradlew bootRun

When the server is running you can try to access the API for example to query all known pet types:

curl http://localhost:8080/api/pet-type

After starting the server you can run the client from the client folder:

PORT=4444 npm start

Note: the Cross-Origin Resource Sharing configuration is set to only permit access to the REST APIs if the client is run on port localhost:4444 (this could be changed if necessary).

Building Docker images

To build run the following from the project root folder:

./docker-build.sh

Running with Docker Compose

To start the server, launch a Terminal and run from the project's root folder:

docker-compose up

Open your browser to http://localhost:4444.

Changes by

John Freeman

GantSign Ltd. Company No. 06109112 (registered in England)

spring-petclinic-openapi's People

Contributors

arey avatar freemanjp avatar nilshartmann avatar pinkanpaula avatar cyrille-leclerc avatar verydapeng avatar gordonad avatar tduchateau avatar trepel avatar anasoid avatar freemansoft avatar liouxiao avatar rstoyanchev avatar aaguilera avatar thinkshihang avatar srenkens avatar sativ01 avatar patrickcrocker avatar mklose avatar lukasz-szewc avatar boly38 avatar vladfau avatar tejasm avatar snicoll avatar oscr avatar meltsufin avatar craigsdennis avatar colinbut avatar cbeams avatar bram-atmire 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.