Class VersionController
- java.lang.Object
-
- com.acumenvelocity.ath.controller.VersionController
-
public class VersionController extends Object
REST Controller for handling ATH (AcumenTranslation Hub) version information. Provides endpoints for retrieving the current version of the ATH application.This controller serves version information that can be used for:
- Client application compatibility checks
- System monitoring and health checks
- Debugging and support purposes
- API version negotiation
API Endpoint: GET /version
Response Format: JSON object containing version information
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Acumen Velocity
-
-
Constructor Summary
Constructors Constructor Description VersionController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.swagger.oas.inflector.models.ResponseContextgetVersion(io.swagger.oas.inflector.models.RequestContext request)Retrieves the current ATH application version.
-
-
-
Method Detail
-
getVersion
public io.swagger.oas.inflector.models.ResponseContext getVersion(io.swagger.oas.inflector.models.RequestContext request)
Retrieves the current ATH application version.This endpoint returns the version information stored in the project properties. The version is typically set during build time and read from application properties.
Response Scenarios:
- 200 Success: Version information retrieved successfully
- 404 Not Found: Version information could not be detected or is missing
Example Success Response:
{ "version": "2.5.1" }Example Error Response:
{ "code": 404, "message": "Version cannot be detected" }- Parameters:
request- the HTTP request context provided by Swagger Inflector. Contains request metadata, headers, and parameters. This endpoint typically doesn't use request parameters.- Returns:
- ResponseContext containing either:
- HTTP 200 with version information in JSON format
- HTTP 404 with error message if version cannot be detected
- See Also:
ProjectProps.getProjectPropValue(String),Const.ATH_PROP_CAT_VERSION,VersionWrapper
-
-