Skip to content

Commit

Permalink
feat: added @Schema for model description
Browse files Browse the repository at this point in the history
  • Loading branch information
myznikov committed Feb 20, 2025
1 parent 769543e commit 219f38b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Templates/v2/Java/dto.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import org.hibernate.validator.constraints.UUID;
@Data
@NoArgsConstructor
@AllArgsConstructor
{%- if model.description %}
@Schema(description = "{{ model.description }}"){% endif %}
public class {{ model.name }} {
{%- for property in model.properties %}
@Schema(description = "{{ property.description }}"{% if property.example %}, example = "{{ property.example }}"{% else %}){% endif %}{% if property.format == "uuid" %}
Expand Down

0 comments on commit 219f38b

Please sign in to comment.