1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
use Serialize;
use ;
use ;
use to_string_pretty;
/// Basic health-check response model.
///
/// Returned by the `/health` endpoint to indicate the
/// operational status of the service.
/// OpenAPI documentation definition for the service.
///
/// This object aggregates exposed paths, components and
/// tags used to generate the API specification.
pub ;
/// Health-check endpoint for the API.
///
/// This endpoint provides a simple mechanism for external systems or load
/// balancers to verify that the server is running correctly. When invoked,
/// it returns a JSON payload indicating the application's status, along
/// with an additional custom header.
///
/// # Response
/// Returns an **HTTP 200 OK** response with:
///
/// - **Content-Type:** `application/json`
/// - **Header:** `api-server: on-line`
/// - **Body:** A JSON object in the form:
///
/// ```json
/// {
/// "status": "UP"
/// }
/// ```
///
/// # Usage
/// Typically used for availability checks, readiness probes, or uptime
/// monitoring systems.
///
/// # Example
/// ```text
/// GET /health
/// → 200 OK
/// → {
/// "status": "UP"
/// }
/// ```
async
/// Configures the base server settings by registering core services.
///
/// This function adds essential endpoints required for the API to operate
/// correctly. Currently, it registers the health-check route, which provides
/// a lightweight way for monitoring systems to verify that the server is
/// running.
///
/// # Parameters
/// - `cfg`: Mutable reference to the Actix-Web [`ServiceConfig`], where
/// routes and services are registered.
///
/// # Behavior
/// - Registers the `/health` endpoint via the `health` service.
/// - Intended as the foundation for additional globally available routes.
///
/// # Notes
/// This function is typically called during the server initialization phase
/// and should contain only fundamental, globally accessible routes.
pub