Skip to content

Missing field descriptions are validated incorrectly - #1052

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

Missing field descriptions are validated incorrectly#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>
@DavJaveiro
DavJaveiro force-pushed the gh-678-missing-field-description branch from 6ed8975 to 8c8530e Compare August 1, 2026 17:56
@wilkinsona wilkinsona changed the title Improve missing field description validation Missing field descriptions are validated incorrectly Aug 17, 2026
@wilkinsona wilkinsona added type: bug A bug and removed status: waiting-for-triage Untriaged issue labels Aug 17, 2026
@wilkinsona wilkinsona added this to the 4.0.x milestone Aug 17, 2026
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

3 participants