Compare commits

..

2 Commits

Author SHA1 Message Date
f1b9e517d4
Обновление версий 2024-11-04 08:47:08 +03:00
2ffbaebcfa
update dependencies 2023-02-11 10:11:24 +03:00
3 changed files with 18 additions and 16 deletions

27
pom.xml
View File

@ -2,10 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent -->
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.1</version> <version>2.7.18</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
@ -18,10 +19,6 @@
<properties> <properties>
<java.version>17</java.version> <java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties> </properties>
<dependencies> <dependencies>
@ -30,20 +27,17 @@
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-annotations -->
<dependency> <dependency>
<groupId>io.swagger.core.v3</groupId> <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId> <artifactId>swagger-annotations</artifactId>
<version>2.2.1</version> <version>2.2.25</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui -->
<dependency> <dependency>
<groupId>org.springdoc</groupId> <groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId> <artifactId>springdoc-openapi-ui</artifactId>
<version>1.6.9</version> <version>1.8.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
@ -56,4 +50,13 @@
</plugins> </plugins>
</build> </build>
<developers>
<developer>
<id>uPagge</id>
<name>Struchkov Mark</name>
<email>mark@struchkov.dev</email>
<url>https://mark.struchkov.dev</url>
</developer>
</developers>
</project> </project>

View File

@ -10,7 +10,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.Min; import javax.validation.constraints.Min;
@ -36,8 +36,8 @@ public class PointController {
@Operation(summary = "Управление баллами", description = "Позволяет удалить или добавить баллы пользователю") @Operation(summary = "Управление баллами", description = "Позволяет удалить или добавить баллы пользователю")
public HttpStatus changePoints( public HttpStatus changePoints(
@PathVariable @NotBlank @Parameter(description = "Идентификатор пользователя") String key, @PathVariable @NotBlank @Parameter(description = "Идентификатор пользователя") String key,
@RequestParam("point") @Min(0) @Parameter(description = "Количество баллов", required = true) Long point, @RequestPart("point") @Min(0) @Parameter(description = "Количество баллов", required = true) Long point,
@RequestParam("type") @Parameter(description = "Тип операции", required = true) TypeOperation type @RequestPart("type") @Parameter(description = "Тип операции", required = true) TypeOperation type
) { ) {
final UserDto userDto = repository.get(key); final UserDto userDto = repository.get(key);
userDto.setPoints( userDto.setPoints(

View File

@ -2,7 +2,6 @@ package org.sadtech.example.swagger.dto;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime; import java.time.LocalDateTime;
/** /**