-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: обновил формат ответа справочников
- Loading branch information
Showing
5 changed files
with
353 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/club/ttg/dnd5/dto/select/DiceSelectOptionDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package club.ttg.dnd5.dto.select; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
@Getter | ||
@Setter | ||
@SuperBuilder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class DiceSelectOptionDto extends SelectOptionDto { | ||
@Schema( | ||
example = "9", | ||
description = "Максимальное значение на кубе", | ||
requiredMode = Schema.RequiredMode.REQUIRED | ||
) | ||
private int maxValue; | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/club/ttg/dnd5/dto/select/SelectOptionDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package club.ttg.dnd5.dto.select; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.*; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
/** | ||
* Описывает один пункт в выпадающем списке. | ||
*/ | ||
@Getter | ||
@Setter | ||
@SuperBuilder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class SelectOptionDto { | ||
@Schema( | ||
example = "Средний", | ||
description = "Отображаемое имя. В выпадающих списках используется для человекочитаемого текста.", | ||
requiredMode = Schema.RequiredMode.REQUIRED | ||
) | ||
private String label; | ||
|
||
@Schema( | ||
example = "MEDIUM", | ||
description = "Используемое значение. Передается в запросах на API, например, при создании вида.", | ||
requiredMode = Schema.RequiredMode.REQUIRED | ||
) | ||
private String value; | ||
} |
Oops, something went wrong.