File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
src/main/kotlin/io/openapiprocessor/spring/processor Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-jdk = "11"
44test-jdk = " 17"
55
66api = " 2023.1"
7- base = " 2024.5 "
7+ base = " 2024.6-SNAPSHOT "
88
99junit = " 5.9.3"
1010jacoco = " 0.8.7"
Original file line number Diff line number Diff line change 66package io.openapiprocessor.spring.processor
77
88import io.openapiprocessor.core.converter.mapping.SimpleParameterValue
9+ import io.openapiprocessor.core.framework.AnnotationType
910import io.openapiprocessor.core.framework.FrameworkAnnotations
1011import io.openapiprocessor.core.model.Annotation
1112import io.openapiprocessor.core.model.RequestBody
@@ -44,6 +45,13 @@ class SpringFrameworkAnnotations: FrameworkAnnotations {
4445 }
4546 }
4647
48+ override fun getAnnotation (type : AnnotationType ): Annotation {
49+ return when (type) {
50+ AnnotationType .INTERFACE_PATH_PREFIX -> REQUEST_MAPPING_ANNOTATION
51+ else -> throw NotImplementedError ()
52+ }
53+ }
54+
4755 private fun getAnnotation (key : String ): Annotation {
4856 return PARAMETER_ANNOTATIONS .getValue(key)
4957 }
@@ -57,6 +65,8 @@ class SpringFrameworkAnnotations: FrameworkAnnotations {
5765 }
5866}
5967
68+ private val REQUEST_MAPPING_ANNOTATION = Annotation (getAnnotationName(" RequestMapping" ))
69+
6070private val MAPPING_ANNOTATIONS = hashMapOf(
6171 HttpMethod .DELETE to Annotation (getMappingAnnotationName(HttpMethod .DELETE .method)),
6272 HttpMethod .GET to Annotation (getMappingAnnotationName(HttpMethod .GET .method)),
You can’t perform that action at this time.
0 commit comments