Annotations on a record's fields are put on the same line as the field declaration (assuming there's room horizontally):
@Schema(description = "A request for a quote")
public record QuoteRequest(
@Schema(description = "US state of the product being quoted", example = "TX")
RegulatoryState regulatoryState,
@Schema(description = "Reason for a quote", example = "New Business") String amendmentReason,
@Schema(description = "Type of quote being requested", example = "NEW_BUSINESS") QuoteType quoteType,
@Schema(description = "Date the quoted changes become active", example = "2023-06-25")
LocalDate quoteEffectiveDate,
)
What did you want to happen?
Annotations go on their own lines as they would for POJO fields:
@Schema(description = "A request for a quote")
public record QuoteRequest(
@Schema(description = "US state of the product being quoted", example = "TX")
RegulatoryState regulatoryState,
@Schema(description = "Reason for a quote", example = "New Business")
String amendmentReason,
@Schema(description = "Type of quote being requested", example = "NEW_BUSINESS")
QuoteType quoteType,
@Schema(description = "Date the quoted changes become active", example = "2023-06-25")
LocalDate quoteEffectiveDate,
)
What happened?
Annotations on a record's fields are put on the same line as the field declaration (assuming there's room horizontally):
What did you want to happen?
Annotations go on their own lines as they would for POJO fields: