Giter Club home page Giter Club logo

estacionamento-spring's Introduction

Estacionamento API

Respostas

Código Descrição
200 Requisição executada com sucesso (ok).
201 Requisição executada com sucesso e novo um livro foi criado (created).
204 Requisição executada com sucesso sem retorno (no content).
404 Registro pesquisado não encontrado (not found).

EndPoints

  GET /parking/
  [
      {
        id: 80,
        plate: "abr-1234",
        time: "60 minutos",
        paid: false,
        out: false,
        dateTimeEntry: "19/09/2021 16:15:12",
        dateTimeOut: null
      },
      {
        id: 81,
        plate: "bru-5123",
        time: "20 minutos",
        paid: false,
        out: false,
        dateTimeEntry: "19/09/2021 16:30:35",
        dateTimeOut: null
      },
  ]
  GET /parking/{plate}
  [
      {
        id: 80,
        plate: "abr-1234",
        time: "60 minutos",
        paid: false,
        out: false,
        dateTimeEntry: "19/09/2021 16:15:12",
        dateTimeOut: null
      }
  ]
POST /parking/abc-1234

{ plate: 'FAA-1234' }
  PATCH /parking/{plate}/pay
      {
        id: 80,
        plate: "abr-1234",
        time: "60 minutos",
        paid: true,
        out: false,
        dateTimeEntry: "19/09/2021 16:15:12",
        dateTimeOut: null
      }
  PATCH /parking/{plate}/out
      {
        id: 80,
        plate: "abr-1234",
        time: "60 minutos",
        paid: true,
        out: false,
        dateTimeEntry: "19/09/2021 16:15:12",
        dateTimeOut: "19/09/2021 19:28:32"
      }

Pré-Requisitos

<dependencies>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-data-jpa</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-validation</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-web</artifactId>
	</dependency>

	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-devtools</artifactId>
		<scope>runtime</scope>
		<optional>true</optional>
	</dependency>
	<dependency>
		<groupId>org.postgresql</groupId>
		<artifactId>postgresql</artifactId>
		<scope>runtime</scope>
	</dependency>
	<dependency>
		<groupId>org.projectlombok</groupId>
		<artifactId>lombok</artifactId>
		<optional>true</optional>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-test</artifactId>
		<scope>test</scope>
	</dependency>
	<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
	<dependency>
		<groupId>org.junit.jupiter</groupId>
		<artifactId>junit-jupiter-api</artifactId>
		<version>5.8.0</version>
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>javax.servlet.jsp</groupId>
		<artifactId>jsp-api</artifactId>
		<version>2.2</version>
		<scope>provided</scope>
	</dependency>
	<dependency>
		<groupId>io.springfox</groupId>
		<artifactId>springfox-swagger2</artifactId>
		<version>3.0.0</version>
	</dependency>
	<dependency>
		<groupId>io.springfox</groupId>
		<artifactId>springfox-boot-starter</artifactId>
		<version>3.0.0</version>
	</dependency>
	<dependency>
		<groupId>io.springfox</groupId>
		<artifactId>springfox-swagger-ui</artifactId>
		<version>3.0.0</version>
	</dependency>
</dependencies>

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.