Добавил externalDocs
This commit is contained in:
parent
5b8d0ad8d7
commit
a333537313
@ -1,5 +1,6 @@
|
|||||||
package org.sadtech.example.swagger.controller;
|
package org.sadtech.example.swagger.controller;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.ExternalDocumentation;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.sadtech.example.swagger.dto.UserDto;
|
import org.sadtech.example.swagger.dto.UserDto;
|
||||||
@ -22,7 +23,14 @@ import static org.springframework.util.MimeTypeUtils.APPLICATION_JSON_VALUE;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/user")
|
@RequestMapping("/api/user")
|
||||||
@Tag(name = "Пользователи", description = "Взаимодействие с пользователями")
|
@Tag(
|
||||||
|
name = "User Controller",
|
||||||
|
description = "Контроллер для управления пользователями",
|
||||||
|
externalDocs = @ExternalDocumentation(
|
||||||
|
description = "Ссылка на общую документацию",
|
||||||
|
url = "https://example.com/docs/user-controller"
|
||||||
|
)
|
||||||
|
)
|
||||||
public class UserController {
|
public class UserController {
|
||||||
|
|
||||||
private final Map<String, UserDto> repository;
|
private final Map<String, UserDto> repository;
|
||||||
|
Loading…
Reference in New Issue
Block a user