-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_spring_annotations.py
More file actions
39 lines (35 loc) · 1000 Bytes
/
Copy path_spring_annotations.py
File metadata and controls
39 lines (35 loc) · 1000 Bytes
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
from __future__ import annotations
# Shared between Java and Kotlin parsers — both target Spring/JPA on the JVM.
SPRING_STEREOTYPES: dict[str, str] = {
"RestController": "controller",
"Controller": "controller",
"Service": "service",
"Repository": "repository",
"Component": "component",
"Configuration": "configuration",
"RestControllerAdvice": "exception_handler",
"ControllerAdvice": "exception_handler",
"Entity": "entity",
"MappedSuperclass": "entity",
}
HTTP_METHOD_ANNOTATIONS: dict[str, str | None] = {
"GetMapping": "GET",
"PostMapping": "POST",
"PutMapping": "PUT",
"DeleteMapping": "DELETE",
"PatchMapping": "PATCH",
"RequestMapping": None, # method determined from attributes
}
LOMBOK_ANNOTATIONS: set[str] = {
"Getter",
"Setter",
"Data",
"Builder",
"NoArgsConstructor",
"AllArgsConstructor",
"RequiredArgsConstructor",
"Slf4j",
"ToString",
"EqualsAndHashCode",
"Value",
}