[ISSUE-115] Fix JavaDoc standards and add javadoc verification #2

Open
Dave wants to merge 3 commits from fix/documentation-standards into main
Owner

Summary

This PR addresses the code review feedback from PR #115 by making the following fixes:

  1. Non-standard Javadoc tags: Replaced custom @security and @response tags with standard Javadoc tags:

    • Instead of @security Requires USER role → use @throws SecurityException if user lacks required role
    • Instead of @response 200 OK → use proper @return tags and document response in the description
  2. Mixed indentation in CfTunnelsApplication.java: Fixed the main method to use consistent spaces (4 spaces) instead of tabs, matching the rest of the codebase.

  3. Added @throws tags: Added proper @throws documentation for methods that can throw exceptions:

    • @throws JsonProcessingException for methods doing JSON processing
    • @throws SecurityException for methods requiring specific roles
  4. Javadoc generation verification:

    • Added javadoc task to build.gradle to generate API documentation
    • Added verifyJavadoc task to verify successful generation
    • Updated test_build.yml workflow to include javadoc generation and verification step

Changes

  • CfTunnelsApplication.java: Fixed indentation, added comprehensive class-level and method-level JavaDoc
  • TunnelController.java: Fixed non-standard Javadoc tags, added @throws documentation, added class-level JavaDoc with examples
  • build.gradle: Added javadoc task configuration
  • .gitea/workflows/test_build.yml: Added javadoc generation and verification steps

Issues

Testing

  • ./gradlew javadoc runs successfully and generates documentation in build/docs/javadoc/
  • ./gradlew verifyJavadoc confirms successful generation
  • Code compiles without errors
## Summary This PR addresses the code review feedback from PR #115 by making the following fixes: 1. **Non-standard Javadoc tags**: Replaced custom `@security` and `@response` tags with standard Javadoc tags: - Instead of `@security Requires USER role` → use `@throws SecurityException if user lacks required role` - Instead of `@response 200 OK` → use proper `@return` tags and document response in the description 2. **Mixed indentation in `CfTunnelsApplication.java`**: Fixed the `main` method to use consistent spaces (4 spaces) instead of tabs, matching the rest of the codebase. 3. **Added `@throws` tags**: Added proper `@throws` documentation for methods that can throw exceptions: - `@throws JsonProcessingException` for methods doing JSON processing - `@throws SecurityException` for methods requiring specific roles 4. **Javadoc generation verification**: - Added javadoc task to build.gradle to generate API documentation - Added verifyJavadoc task to verify successful generation - Updated test_build.yml workflow to include javadoc generation and verification step ## Changes - `CfTunnelsApplication.java`: Fixed indentation, added comprehensive class-level and method-level JavaDoc - `TunnelController.java`: Fixed non-standard Javadoc tags, added @throws documentation, added class-level JavaDoc with examples - `build.gradle`: Added javadoc task configuration - `.gitea/workflows/test_build.yml`: Added javadoc generation and verification steps ## Issues - Hithomelabs/CFTunnels#115 ## Testing - `./gradlew javadoc` runs successfully and generates documentation in `build/docs/javadoc/` - `./gradlew verifyJavadoc` confirms successful generation - Code compiles without errors
Dave added 3 commits 2026-04-15 18:22:42 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/documentation-standards:fix/documentation-standards
git checkout fix/documentation-standards
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Dave/CFTunnels#2
No description provided.