Documented RoomPicker Info
This commit is contained in:
parent
340fd3e7f6
commit
ee3d890a84
@ -1,3 +1,8 @@
|
|||||||
package ru.dragonestia.picker.api.repository.response;
|
package ru.dragonestia.picker.api.repository.response;
|
||||||
|
|
||||||
public record RoomPickerInfoResponse(String version) {}
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
@Schema(title = "Server info", hidden = true)
|
||||||
|
public record RoomPickerInfoResponse(
|
||||||
|
@Schema(description = "RoomPicker server version", example = "0.0.1") String version
|
||||||
|
) {}
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
|||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.core.parameters.P;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import ru.dragonestia.picker.api.exception.NodeNotFoundException;
|
import ru.dragonestia.picker.api.exception.NodeNotFoundException;
|
||||||
import ru.dragonestia.picker.api.exception.RoomNotFoundException;
|
import ru.dragonestia.picker.api.exception.RoomNotFoundException;
|
||||||
|
|||||||
@ -1,12 +1,16 @@
|
|||||||
package ru.dragonestia.picker.controller;
|
package ru.dragonestia.picker.controller;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import ru.dragonestia.picker.api.repository.response.RoomPickerInfoResponse;
|
import ru.dragonestia.picker.api.repository.response.RoomPickerInfoResponse;
|
||||||
|
|
||||||
|
@Tag(name = "RoomPicker")
|
||||||
@RestController
|
@RestController
|
||||||
public class RoomPickerController {
|
public class RoomPickerController {
|
||||||
|
|
||||||
|
@Operation(summary = "Server info")
|
||||||
@GetMapping("/info")
|
@GetMapping("/info")
|
||||||
RoomPickerInfoResponse info() {
|
RoomPickerInfoResponse info() {
|
||||||
return new RoomPickerInfoResponse("v0.0.1");
|
return new RoomPickerInfoResponse("v0.0.1");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user