Добавил externalDocs

This commit is contained in:
Struchkov Mark 2024-11-04 09:13:36 +03:00
parent 5b8d0ad8d7
commit a333537313
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C

View File

@ -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;