• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

torand / openapi2java / 18402175194

10 Oct 2025 09:15AM UTC coverage: 81.86% (-0.04%) from 81.898%
18402175194

push

github

torand
test: add test case for primitive array subtype

541 of 779 branches covered (69.45%)

Branch coverage included in aggregate %.

1616 of 1856 relevant lines covered (87.07%)

5.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.78
/src/main/java/io/github/torand/openapi2java/utils/KotlinTypeMapper.java
1
/*
2
 * Copyright (c) 2024-2025 Tore Eide Andersen
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package io.github.torand.openapi2java.utils;
17

18
/**
19
 * Provides functions to map between Java and Kotlin native types-
20
 */
21
public final class KotlinTypeMapper {
22
    private KotlinTypeMapper() {}
23

24
    public static String toKotlinNative(String typeName) {
25
        return switch (typeName) {
9!
26
            case "Integer" -> "Int";
2✔
27
            case "byte" -> "Byte";
×
28
            case "byte[]" -> "ByteArray";
2✔
29
            default -> typeName;
1✔
30
        };
31
    }
32
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc