GithubHelp home page GithubHelp logo

carshop's Introduction

carshop

Desafio Itaú para criar um serviço de cadastro de veículos.

Requisitos

Como executar

  • Baixar o código para a máquina destino.
  • Executar: .\mvnw spring-boot:run.

Verificando a aplicação

  • Acessar http://localhost:8080/carshop/automoveis (caso o serviço do API Gateway esteja rodando) OU http://localhost:8090/automoveis para acessar diretamente.

Exemplos

Chamada do método "/automoveis"

  • Requisição:
    curl --location --request GET 'localhost:8080/carshop/automoveis'
    
  • Resposta:
    [
      {
        "id": 1,
        "brand": "Land Rover",
        "model": "Discovery Sport",
        "price": 219999.0,
        "createdAt": "2019-01-01"
      },
      {
        "id": 2,
        "brand": "Ford",
        "model": "Fusion",
        "price": 27990.0,
        "createdAt": "2018-01-01"
      },
      {
        "id": 3,
        "brand": "Citroen",
        "model": "C3",
        "price": 16900.0,
        "createdAt": "2015-01-01"
      },
      {
        "id": 4,
        "brand": "Volkswagen",
        "model": "Gol",
        "price": 34900.0,
        "createdAt": "2015-01-01"
      },
      {
        "id": 5,
        "brand": "Audi",
        "model": "A6",
        "price": 162800.0,
        "createdAt": "2001-01-01"
      },
      {
        "id": 6,
        "brand": "BMW",
        "model": "X5",
        "price": 65000.0,
        "createdAt": "2010-01-01"
      },
      {
        "id": 7,
        "brand": "Hyundai",
        "model": "Genesis",
        "price": 70900.0,
        "createdAt": "2008-01-01"
      }
    ]

Chamada do método "/cadastroAutomoveis"

  • Requisição:

    curl --location --request POST 'localhost:8080/carshop/cadastroAutomoveis' \
      --header 'Content-Type: application/json' \
      --data-raw '{
      "brand":"Honda",
      "model":"Fit",
      "price":23000.59 }'
    
  • Resposta:

    {
      "id": 8,
      "brand": "Honda",
      "model": "Fit",
      "price": 23000.59,
      "createdAt": "2021-02-07"
    }

carshop's People

Contributors

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