Giter VIP home page Giter VIP logo

backend-poc's Introduction

GetPrices with Spring-Boot

Este proyecto implementa una POC como micro-servicio (API) utilizando Spring-boot y Maven para la obtención de precios aplicando filtros. Leer el enunciado para más información.

Como utilizar

Abrir una consola y ejecutar:

git clone https://github.com/lsaletta/backend-poc.git
cd backend-poc
mvn clean install
java -jar target/poc-0.0.1-SNAPSHOT.jar

USO DE LA API

Despues de seguir los pasos anteriores, estará la API arrancada en: http://localhost:8080

Se ha añadido al micro-servicio Swagger. URL Swagger: http://localhost:8080/swagger-ui-custom.html

El modelo definido para los precios es el siguiente:

{
    "brand_id": 0,
    "start_date": "2021-06-11T09:21:38.123Z",
    "end_date": "2021-06-11T09:21:38.123Z",
    "price_list": 0,
    "product_id": 0,
    "priority": 0,
    "price": 0,
    "currency": "string"
}

Un ejemplo de peticion seria:

Inputs:

  • application_date: 2020-06-14 16:00:00
  • product_id: 35455
  • brand_id: 1

Request:

curl --location --request GET 'http://localhost:8080/backend/price?application_date=2020-06-14%2016%3A00%3A00&product_id=35455&brand_id=1'

Response:

{
    "brand_id": 1,
    "start_date": "2020-06-14T15:00:00",
    "end_date": "2020-06-14T18:30:00",
    "price_list": 2,
    "product_id": 35455,
    "priority": 1,
    "price": 25.45,
    "currency": "EUR"
}

backend-poc's People

Contributors

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