Skip to content

Conversation

@testower
Copy link
Collaborator

@testower testower commented Oct 5, 2025

CLI Module Implementation

Closes #97

Implements a command-line interface for GBFS validation as a new Maven module (gbfs-validator-java-cli).

Changes

  • New CLI module with Picocli for argument parsing
  • Executable JAR packaging via Maven Shade Plugin
  • Authentication support for Basic, Bearer, and OAuth Client Credentials
  • Multiple output formats: human-readable text and JSON
  • Report options: console output and file saving
  • Exit codes: 0 (valid), 1 (validation errors), 2 (system errors)
  • Test coverage: unit tests with WireMock for integration testing
  • Version injection from Maven build properties

Usage

java -jar gbfs-validator-cli.jar --url https://example.com/gbfs.json
java -jar gbfs-validator-cli.jar --url https://example.com/gbfs.json --verbose --save-report report.txt
java -jar gbfs-validator-cli.jar --url https://example.com/gbfs.json --format json
java -jar gbfs-validator-cli.jar --url https://example.com/gbfs.json --auth-type basic --username user --password pass

Implementation

- Thin orchestration layer leveraging existing gbfs-validator-java and gbfs-validator-java-loader modules
- Console and JSON report formatters for ValidationResult output
- Picocli annotations for declarative CLI definition
- Jacoco and Surefire configuration matching other modules

@testower testower changed the title Draft cli module Feature: CLI module Oct 5, 2025
@testower testower marked this pull request as ready for review October 7, 2025 13:06
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 7, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
60.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@testower testower merged commit 4c8c0ee into master Oct 7, 2025
3 of 4 checks passed
@testower testower deleted the feature/cli branch October 7, 2025 18:29
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.

Feature Request: Provide validation as CLI tool

3 participants