Skip to content

Improve missing field description validation - #1052

Open
DavJaveiro wants to merge 1 commit into
spring-projects:mainfrom
DavJaveiro:gh-678-missing-field-description
Open

Improve missing field description validation#1052
DavJaveiro wants to merge 1 commit into
spring-projects:mainfrom
DavJaveiro:gh-678-missing-field-description

Conversation

@DavJaveiro

@DavJaveiro DavJaveiro commented Aug 1, 2026

Copy link
Copy Markdown

This updates field descriptor validation to check the descriptor's description directly
rather than the result of comparing it with null.

Previously, a field descriptor without a description was not rejected during snippet
construction because descriptor.getDescription() != null produced a non-null Boolean
value. This allowed the missing description to be reported later as a template rendering
error.

A regression test has been added to verify that a non-ignored field descriptor without a
description fails with a clear message.

Closes #678

Tests:

  • ./gradlew :spring-restdocs-core:test
  • ./gradlew check

Signed-off-by: DavJaveiro <davidson.linhares@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide better diagnostics when a descriptor is missing a property required by the snippet template

2 participants