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
// This test file demonstrates compile-time validation of doc comment annotations.
// Uncomment any of the examples below to see the validation errors at compile time.
/*
// Example 1: Invalid status code (too high)
/// Test handler
///
/// # Responses
///
/// 999: Json<String> - Invalid status code
#[rovo]
async fn invalid_status_code() -> impl IntoApiResponse {
Json("test".to_string())
}
*/
/*
// Example 2: Empty tag
/// Test handler
///
/// # Metadata
///
/// @tag
#[rovo]
async fn empty_tag() -> impl IntoApiResponse {
Json("test".to_string())
}
*/
/*
// Example 3: Invalid operation ID (contains spaces)
/// Test handler
///
/// # Metadata
///
/// @id my handler
#[rovo]
async fn invalid_operation_id() -> impl IntoApiResponse {
Json("test".to_string())
}
*/
/*
// Example 4: Unknown annotation
/// Test handler
///
/// # Metadata
///
/// @unknown something
#[rovo]
async fn unknown_annotation() -> impl IntoApiResponse {
Json("test".to_string())
}
*/