@@ -112,89 +112,3 @@ private fun getMappingAnnotationName(mappingName: String): String {
112112private fun getAnnotationName (name : String ): String {
113113 return " ${ANNOTATION_PKG } .${name} "
114114}
115-
116- // To avoid a dependency on Spring, the map provides the http status enum names.
117- // This may break if the enum name does not exist in the used Spring version.
118-
119- // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
120-
121- private val HTTP_STATUS = hashMapOf(
122- " 100" to getEnum(" CONTINUE" ),
123- " 101" to getEnum(" SWITCHING_PROTOCOLS" ),
124- " 102" to getEnum(" PROCESSING" ), // WebDAV
125- " 103" to getEnum(" CHECKPOINT" ),
126-
127- " 200" to getEnum(" OK" ),
128- " 201" to getEnum(" CREATED" ),
129- " 202" to getEnum(" ACCEPTED" ),
130- " 203" to getEnum(" NON_AUTHORITATIVE_INFORMATION" ),
131- " 204" to getEnum(" NO_CONTENT" ),
132- " 205" to getEnum(" RESET_CONTENT" ),
133- " 206" to getEnum(" PARTIAL_CONTENT" ),
134- " 207" to getEnum(" MULTI_STATUS" ), // WebDAV
135- " 208" to getEnum(" ALREADY_REPORTED" ), // WebDAV
136- " 226" to getEnum(" IM_USED" ),
137-
138- " 300" to getEnum(" MULTIPLE_CHOICES" ),
139- " 301" to getEnum(" MOVED_PERMANENTLY" ),
140- " 302" to getEnum(" MOVED_TEMPORARILY" ),
141- // "302" to getEnum("FOUND"), // replaces MOVED_TEMPORARILY
142- " 303" to getEnum(" SEE_OTHER" ),
143- " 304" to getEnum(" NOT_MODIFIED" ),
144- " 305" to getEnum(" USE_PROXY" ),
145- " 307" to getEnum(" TEMPORARY_REDIRECT" ),
146- " 308" to getEnum(" PERMANENT_REDIRECT" ),
147-
148- " 400" to getEnum(" BAD_REQUEST" ),
149- " 401" to getEnum(" UNAUTHORIZED" ),
150- " 402" to getEnum(" PAYMENT_REQUIRED" ),
151- " 403" to getEnum(" FORBIDDEN" ),
152- " 404" to getEnum(" NOT_FOUND" ),
153- " 405" to getEnum(" METHOD_NOT_ALLOWED" ),
154- " 406" to getEnum(" NOT_ACCEPTABLE" ),
155- " 407" to getEnum(" PROXY_AUTHENTICATION_REQUIRED" ),
156- " 408" to getEnum(" REQUEST_TIMEOUT" ),
157- " 409" to getEnum(" CONFLICT" ),
158- " 410" to getEnum(" GONE" ),
159- " 411" to getEnum(" LENGTH_REQUIRED" ),
160- " 412" to getEnum(" PRECONDITION_FAILED" ),
161- " 413" to getEnum(" REQUEST_ENTITY_TOO_LARGE" ),
162- // "413" to getEnum("PAYLOAD_TOO_LARGE"), // replaces REQUEST_ENTITY_TOO_LARGE
163- " 414" to getEnum(" REQUEST_URI_TOO_LONG" ),
164- // "414" to getEnum("URI_TOO_LONG"), // replaces REQUEST_URI_TOO_LONG
165- " 415" to getEnum(" UNSUPPORTED_MEDIA_TYPE" ),
166- " 416" to getEnum(" REQUESTED_RANGE_NOT_SATISFIABLE" ),
167- " 417" to getEnum(" EXPECTATION_FAILED" ),
168- " 418" to getEnum(" I_AM_A_TEAPOT" ),
169- " 419" to getEnum(" INSUFFICIENT_SPACE_ON_RESOURCE" ), // WebDAV
170- " 420" to getEnum(" METHOD_FAILURE" ), // WebDAV
171- " 421" to getEnum(" DESTINATION_LOCKED" ), // WebDAV
172- " 422" to getEnum(" UNPROCESSABLE_ENTITY" ), // WebDAV
173- " 423" to getEnum(" LOCKED" ), // WebDAV
174- " 424" to getEnum(" FAILED_DEPENDENCY" ), // WebDAV
175- " 425" to getEnum(" TOO_EARLY" ),
176- " 426" to getEnum(" UPGRADE_REQUIRED" ),
177- " 428" to getEnum(" PRECONDITION_REQUIRED" ),
178- " 429" to getEnum(" TOO_MANY_REQUESTS" ),
179- " 431" to getEnum(" REQUEST_HEADER_FIELDS_TOO_LARGE" ),
180- " 451" to getEnum(" UNAVAILABLE_FOR_LEGAL_REASONS" ),
181-
182- " 500" to getEnum(" INTERNAL_SERVER_ERROR" ),
183- " 501" to getEnum(" NOT_IMPLEMENTED" ),
184- " 502" to getEnum(" BAD_GATEWAY" ),
185- " 503" to getEnum(" SERVICE_UNAVAILABLE" ),
186- " 504" to getEnum(" GATEWAY_TIMEOUT" ),
187- " 505" to getEnum(" HTTP_VERSION_NOT_SUPPORTED" ),
188- " 506" to getEnum(" VARIANT_ALSO_NEGOTIATES" ),
189- " 507" to getEnum(" INSUFFICIENT_STORAGE" ), // WebDAV
190- " 508" to getEnum(" LOOP_DETECTED" ), // WebDAV
191- " 509" to getEnum(" BANDWIDTH_LIMIT_EXCEEDED" ),
192- " 510" to getEnum(" NOT_EXTENDED" ),
193- " 511" to getEnum(" NETWORK_AUTHENTICATION_REQUIRED" )
194- )
195-
196- private const val HTTP_STATUS_ENUM = " org.springframework.http.HttpStatus"
197-
198- private fun getEnum (name : String ): String {
199- return " HttpStatus.${name} "
200- }
0 commit comments