upgrade to springdoc-openapi v1.5.2

This commit is contained in:
bnasslah 2020-12-17 13:49:42 +01:00
parent e00b3dc256
commit 450c0fe6db
2 changed files with 13 additions and 13 deletions

View File

@ -171,7 +171,7 @@
<properties>
<java.version>1.8</java.version>
<hibernate.version>5.2.10.Final</hibernate.version>
<springdoc.version>1.2.32</springdoc.version>
<springdoc.version>1.5.2</springdoc.version>
<asciidoctor-plugin.version>1.5.6</asciidoctor-plugin.version>
<kotlin.version>1.2.71</kotlin.version>
<snippetsDirectory>${project.build.directory}/generated-snippets</snippetsDirectory>

View File

@ -5,6 +5,17 @@ import java.util.Collection;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import com.baeldung.springdoc.exception.BookNotFoundException;
import com.baeldung.springdoc.model.Book;
import com.baeldung.springdoc.repository.BookRepository;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import org.springdoc.api.annotations.ParameterObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@ -21,17 +32,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import com.baeldung.springdoc.exception.BookNotFoundException;
import com.baeldung.springdoc.model.Book;
import com.baeldung.springdoc.repository.BookRepository;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
@RestController
@RequestMapping("/api/book")
public class BookController {
@ -58,7 +58,7 @@ public class BookController {
}
@GetMapping("/filter")
public Page<Book> filterBooks(Pageable pageable) {
public Page<Book> filterBooks(@ParameterObject Pageable pageable) {
return repository.getBooks(pageable);
}