This repository was archived by the owner on Mar 16, 2025. It is now read-only.
File tree 2 files changed +7
-7
lines changed
src/main/kotlin/io/openapiprocessor/core/converter/mapping
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -188,27 +188,27 @@ class MappingFinder(private val typeMappings: List<Mapping> = emptyList()) {
188
188
* @param info schema info of the OpenAPI schema.
189
189
* @return the "null" type mappings or null if there is no match.
190
190
*/
191
- fun findEndpointNullTypeMapping (info : SchemaInfo ): TypeMapping ? {
191
+ fun findEndpointNullTypeMapping (info : SchemaInfo ): NullTypeMapping ? {
192
192
val ep = filterMappings(EndpointTypeMatcher (info.getPath()), typeMappings)
193
193
194
194
val matches = filterMappings(NullTypeMatcher (), ep)
195
195
if (matches.isEmpty())
196
196
return null
197
197
198
- return matches.first() as TypeMapping
198
+ return matches.first() as NullTypeMapping
199
199
}
200
200
201
201
/* *
202
202
* find (global) "null" type mapping.
203
203
*
204
204
* @return the "multi" type mappings or null if there is no match.
205
205
*/
206
- fun findNullTypeMapping (): TypeMapping ? {
206
+ fun findNullTypeMapping (): NullTypeMapping ? {
207
207
val matches = filterMappings(NullTypeMatcher (), typeMappings)
208
208
if (matches.isEmpty())
209
209
return null
210
210
211
- return matches.first() as TypeMapping
211
+ return matches.first() as NullTypeMapping
212
212
}
213
213
214
214
private fun getTypeMapping (mappings : List <Mapping >): TypeMapping ? {
Original file line number Diff line number Diff line change 5
5
6
6
package io.openapiprocessor.core.converter.mapping.matcher
7
7
8
- import io.openapiprocessor.core.converter.mapping.TypeMapping
8
+ import io.openapiprocessor.core.converter.mapping.NullTypeMapping
9
9
10
10
/* *
11
11
* [io.openapiprocessor.core.converter.mapping.MappingFinder] matcher for null type mapping.
12
12
*/
13
- class NullTypeMatcher : (TypeMapping ) -> Boolean {
13
+ class NullTypeMatcher : (NullTypeMapping ) -> Boolean {
14
14
15
- override fun invoke (mapping : TypeMapping ): Boolean {
15
+ override fun invoke (mapping : NullTypeMapping ): Boolean {
16
16
return mapping.sourceTypeName == " null"
17
17
}
18
18
You can’t perform that action at this time.
0 commit comments