@@ -8,6 +8,7 @@ package io.openapiprocessor.spring.processor
88import io.openapiprocessor.core.converter.mapping.SimpleParameterValue
99import io.openapiprocessor.core.framework.FrameworkAnnotations
1010import io.openapiprocessor.core.model.Annotation
11+ import io.openapiprocessor.core.model.EndpointResponseStatus
1112import io.openapiprocessor.core.model.RequestBody
1213import io.openapiprocessor.core.model.parameters.CookieParameter
1314import io.openapiprocessor.core.model.parameters.HeaderParameter
@@ -44,6 +45,10 @@ class SpringFrameworkAnnotations: FrameworkAnnotations {
4445 }
4546 }
4647
48+ override fun getAnnotation (status : EndpointResponseStatus ): Annotation {
49+ return RESPONSE_STATUS_ANNOTATION
50+ }
51+
4752 private fun getAnnotation (key : String ): Annotation {
4853 return PARAMETER_ANNOTATIONS .getValue(key)
4954 }
@@ -90,6 +95,12 @@ private val PARAMETER_ANNOTATIONS = hashMapOf(
9095 " body" to Annotation (getAnnotationName(" RequestBody" ))
9196)
9297
98+ private val RESPONSE_STATUS_ANNOTATION = Annotation (
99+ getAnnotationName(" ResponseStatus" ),
100+ linkedMapOf(" code" to SimpleParameterValue (
101+ " HttpStatus" , " org.springframework.http.HttpStatus"
102+ )))
103+
93104private val UNKNOWN_ANNOTATION = Annotation (" Unknown" )
94105
95106private const val ANNOTATION_PKG = " org.springframework.web.bind.annotation"
0 commit comments