Skip to content

Conversation

nandorholozsnyak
Copy link
Member

Pull Request: Support Optional type Field in Spring Boot Metadata & Template Cleanup

Summary

This PR implements support for configuration properties without a type field, as allowed by the Spring Boot metadata specification. It also refines Handlebars templates to prevent extra blank lines in generated documentation.

Changes

  • Core Logic

    • The type field is now optional in property metadata parsing and grouping.
    • Model and grouping logic updated to handle missing type values gracefully.
  • Templates

    • Handlebars templates (.hbs files) for Markdown, HTML, and AsciiDoc now use the tilde (~) in if statements to suppress unwanted whitespace.
    • All conditional rendering for the type field is now whitespace-safe.
  • Tests

    • Added and updated tests to cover properties without a type.
    • Adjusted test resources and assertions for the new logic.
    • All unit and integration tests pass.

Motivation

Spring Boot does not require the type field for configuration properties. This change ensures compatibility and prevents errors for such cases. Template improvements result in cleaner, more predictable documentation output.

Notes

  • No breaking changes for users who provide the type field.
  • All tests pass and the build

@nandorholozsnyak nandorholozsnyak linked an issue Aug 20, 2025 that may be closed by this pull request
@nandorholozsnyak nandorholozsnyak merged commit 454d719 into master Aug 20, 2025
2 checks passed
@nandorholozsnyak nandorholozsnyak deleted the 115-propertytype-is-mandatory-but-shouldnt-be branch August 20, 2025 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Property.type is mandatory but shouldn't be
1 participant