Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit c68d117

Browse files
authored
Kotlin removes unused methods (#436)
* Removes makeMap * Fixes kotlin tests, removes unused methods * Kotlin samples regen * Readme table tweaks
1 parent 5971cdc commit c68d117

File tree

256 files changed

+1191
-1290
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+1191
-1290
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ so developers can use all of those features.
1515

1616
Currently, the following languages/frameworks are supported:
1717

18-
| Feature | [Python](docs/generators/python.md) | [Java](docs/generators/java.md) | [Kotlin](docs/generators/kotlin.md) |
19-
|----------------------------------------------------------------------------------------------------|-------------------------------------|---------------------------------|-------------------------------------|
20-
| Generator status | stable | stable | experimental |
21-
| Openapi v3.0.0-3.1.0 ingestion | X | X | X |
22-
| Json Schema 2020-12 Support (components/schemas) | X | X | X |
23-
| Component schemas documentation produced | X | X | X |
18+
| Feature | [Python](docs/generators/python.md) | [Java](docs/generators/java.md) | [Kotlin](docs/generators/kotlin.md) |
19+
|----------------------------------------------------------------------------------------------------------------------|-------------------------------------|---------------------------------|-------------------------------------|
20+
| Generator status | stable | stable | experimental |
21+
| Openapi v3.0.0-3.1.0 ingestion | X | X | X |
22+
| Json Schema 2020-12 Support (components/schemas) | X | X | X |
23+
| Component schema classes + documentation produced | X | X | X |
2424
| Documentation produced for other component types:<br>headers, parameters, requestBodies, ressponses, securitySchemes | X | X | |
25-
| Endpoints that send/receive json + docs generated for them | X | X | |
25+
| Methods generated for endpoints <br>that send/receive json + docs generated for them | X | X | |
2626

2727
## Reasons To Use the Generators
2828
- Openapi spec support for v3.0.0-3.1.0

samples/client/3_0_3_unit_test/kotlin/src/main/kotlin/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefault.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,13 @@ class AdditionalpropertiesAreAllowedByDefault {
459459
}
460460
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
461461
if (arg == null) {
462-
return getNewInstance( null, pathToItem, pathToSchemas)
462+
return arg
463463
} else if (arg is Boolean) {
464-
return getNewInstance(arg, pathToItem, pathToSchemas)
464+
return arg
465465
} else if (arg is Number) {
466-
return getNewInstance(arg, pathToItem, pathToSchemas)
466+
return arg
467467
} else if (arg is String) {
468-
return getNewInstance(arg, pathToItem, pathToSchemas)
468+
return arg
469469
} else if (arg is List<*>) {
470470
return getNewInstance(arg, pathToItem, pathToSchemas)
471471
} else if (arg is Map<*, *>) {

samples/client/3_0_3_unit_test/kotlin/src/main/kotlin/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.kt

+8-8
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,13 @@ class AdditionalpropertiesShouldNotLookInApplicators {
385385
}
386386
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
387387
if (arg == null) {
388-
return getNewInstance( null, pathToItem, pathToSchemas)
388+
return arg
389389
} else if (arg is Boolean) {
390-
return getNewInstance(arg, pathToItem, pathToSchemas)
390+
return arg
391391
} else if (arg is Number) {
392-
return getNewInstance(arg, pathToItem, pathToSchemas)
392+
return arg
393393
} else if (arg is String) {
394-
return getNewInstance(arg, pathToItem, pathToSchemas)
394+
return arg
395395
} else if (arg is List<*>) {
396396
return getNewInstance(arg, pathToItem, pathToSchemas)
397397
} else if (arg is Map<*, *>) {
@@ -728,13 +728,13 @@ class AdditionalpropertiesShouldNotLookInApplicators {
728728
}
729729
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
730730
if (arg == null) {
731-
return getNewInstance( null, pathToItem, pathToSchemas)
731+
return arg
732732
} else if (arg is Boolean) {
733-
return getNewInstance(arg, pathToItem, pathToSchemas)
733+
return arg
734734
} else if (arg is Number) {
735-
return getNewInstance(arg, pathToItem, pathToSchemas)
735+
return arg
736736
} else if (arg is String) {
737-
return getNewInstance(arg, pathToItem, pathToSchemas)
737+
return arg
738738
} else if (arg is List<*>) {
739739
return getNewInstance(arg, pathToItem, pathToSchemas)
740740
} else if (arg is Map<*, *>) {

samples/client/3_0_3_unit_test/kotlin/src/main/kotlin/org/openapijsonschematools/client/components/schemas/Allof.kt

+12-12
Original file line numberDiff line numberDiff line change
@@ -353,13 +353,13 @@ class Allof {
353353
}
354354
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
355355
if (arg == null) {
356-
return getNewInstance( null, pathToItem, pathToSchemas)
356+
return arg
357357
} else if (arg is Boolean) {
358-
return getNewInstance(arg, pathToItem, pathToSchemas)
358+
return arg
359359
} else if (arg is Number) {
360-
return getNewInstance(arg, pathToItem, pathToSchemas)
360+
return arg
361361
} else if (arg is String) {
362-
return getNewInstance(arg, pathToItem, pathToSchemas)
362+
return arg
363363
} else if (arg is List<*>) {
364364
return getNewInstance(arg, pathToItem, pathToSchemas)
365365
} else if (arg is Map<*, *>) {
@@ -717,13 +717,13 @@ class Allof {
717717
}
718718
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
719719
if (arg == null) {
720-
return getNewInstance( null, pathToItem, pathToSchemas)
720+
return arg
721721
} else if (arg is Boolean) {
722-
return getNewInstance(arg, pathToItem, pathToSchemas)
722+
return arg
723723
} else if (arg is Number) {
724-
return getNewInstance(arg, pathToItem, pathToSchemas)
724+
return arg
725725
} else if (arg is String) {
726-
return getNewInstance(arg, pathToItem, pathToSchemas)
726+
return arg
727727
} else if (arg is List<*>) {
728728
return getNewInstance(arg, pathToItem, pathToSchemas)
729729
} else if (arg is Map<*, *>) {
@@ -1001,13 +1001,13 @@ class Allof {
10011001
}
10021002
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
10031003
if (arg == null) {
1004-
return getNewInstance( null, pathToItem, pathToSchemas)
1004+
return arg
10051005
} else if (arg is Boolean) {
1006-
return getNewInstance(arg, pathToItem, pathToSchemas)
1006+
return arg
10071007
} else if (arg is Number) {
1008-
return getNewInstance(arg, pathToItem, pathToSchemas)
1008+
return arg
10091009
} else if (arg is String) {
1010-
return getNewInstance(arg, pathToItem, pathToSchemas)
1010+
return arg
10111011
} else if (arg is List<*>) {
10121012
return getNewInstance(arg, pathToItem, pathToSchemas)
10131013
} else if (arg is Map<*, *>) {

samples/client/3_0_3_unit_test/kotlin/src/main/kotlin/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.kt

+16-16
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,13 @@ class AllofCombinedWithAnyofOneof {
244244
}
245245
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
246246
if (arg == null) {
247-
return getNewInstance( null, pathToItem, pathToSchemas)
247+
return arg
248248
} else if (arg is Boolean) {
249-
return getNewInstance(arg, pathToItem, pathToSchemas)
249+
return arg
250250
} else if (arg is Number) {
251-
return getNewInstance(arg, pathToItem, pathToSchemas)
251+
return arg
252252
} else if (arg is String) {
253-
return getNewInstance(arg, pathToItem, pathToSchemas)
253+
return arg
254254
} else if (arg is List<*>) {
255255
return getNewInstance(arg, pathToItem, pathToSchemas)
256256
} else if (arg is Map<*, *>) {
@@ -519,13 +519,13 @@ class AllofCombinedWithAnyofOneof {
519519
}
520520
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
521521
if (arg == null) {
522-
return getNewInstance( null, pathToItem, pathToSchemas)
522+
return arg
523523
} else if (arg is Boolean) {
524-
return getNewInstance(arg, pathToItem, pathToSchemas)
524+
return arg
525525
} else if (arg is Number) {
526-
return getNewInstance(arg, pathToItem, pathToSchemas)
526+
return arg
527527
} else if (arg is String) {
528-
return getNewInstance(arg, pathToItem, pathToSchemas)
528+
return arg
529529
} else if (arg is List<*>) {
530530
return getNewInstance(arg, pathToItem, pathToSchemas)
531531
} else if (arg is Map<*, *>) {
@@ -794,13 +794,13 @@ class AllofCombinedWithAnyofOneof {
794794
}
795795
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
796796
if (arg == null) {
797-
return getNewInstance( null, pathToItem, pathToSchemas)
797+
return arg
798798
} else if (arg is Boolean) {
799-
return getNewInstance(arg, pathToItem, pathToSchemas)
799+
return arg
800800
} else if (arg is Number) {
801-
return getNewInstance(arg, pathToItem, pathToSchemas)
801+
return arg
802802
} else if (arg is String) {
803-
return getNewInstance(arg, pathToItem, pathToSchemas)
803+
return arg
804804
} else if (arg is List<*>) {
805805
return getNewInstance(arg, pathToItem, pathToSchemas)
806806
} else if (arg is Map<*, *>) {
@@ -1083,13 +1083,13 @@ class AllofCombinedWithAnyofOneof {
10831083
}
10841084
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
10851085
if (arg == null) {
1086-
return getNewInstance( null, pathToItem, pathToSchemas)
1086+
return arg
10871087
} else if (arg is Boolean) {
1088-
return getNewInstance(arg, pathToItem, pathToSchemas)
1088+
return arg
10891089
} else if (arg is Number) {
1090-
return getNewInstance(arg, pathToItem, pathToSchemas)
1090+
return arg
10911091
} else if (arg is String) {
1092-
return getNewInstance(arg, pathToItem, pathToSchemas)
1092+
return arg
10931093
} else if (arg is List<*>) {
10941094
return getNewInstance(arg, pathToItem, pathToSchemas)
10951095
} else if (arg is Map<*, *>) {

samples/client/3_0_3_unit_test/kotlin/src/main/kotlin/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.kt

+12-12
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@ class AllofSimpleTypes {
243243
}
244244
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
245245
if (arg == null) {
246-
return getNewInstance( null, pathToItem, pathToSchemas)
246+
return arg
247247
} else if (arg is Boolean) {
248-
return getNewInstance(arg, pathToItem, pathToSchemas)
248+
return arg
249249
} else if (arg is Number) {
250-
return getNewInstance(arg, pathToItem, pathToSchemas)
250+
return arg
251251
} else if (arg is String) {
252-
return getNewInstance(arg, pathToItem, pathToSchemas)
252+
return arg
253253
} else if (arg is List<*>) {
254254
return getNewInstance(arg, pathToItem, pathToSchemas)
255255
} else if (arg is Map<*, *>) {
@@ -518,13 +518,13 @@ class AllofSimpleTypes {
518518
}
519519
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
520520
if (arg == null) {
521-
return getNewInstance( null, pathToItem, pathToSchemas)
521+
return arg
522522
} else if (arg is Boolean) {
523-
return getNewInstance(arg, pathToItem, pathToSchemas)
523+
return arg
524524
} else if (arg is Number) {
525-
return getNewInstance(arg, pathToItem, pathToSchemas)
525+
return arg
526526
} else if (arg is String) {
527-
return getNewInstance(arg, pathToItem, pathToSchemas)
527+
return arg
528528
} else if (arg is List<*>) {
529529
return getNewInstance(arg, pathToItem, pathToSchemas)
530530
} else if (arg is Map<*, *>) {
@@ -802,13 +802,13 @@ class AllofSimpleTypes {
802802
}
803803
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
804804
if (arg == null) {
805-
return getNewInstance( null, pathToItem, pathToSchemas)
805+
return arg
806806
} else if (arg is Boolean) {
807-
return getNewInstance(arg, pathToItem, pathToSchemas)
807+
return arg
808808
} else if (arg is Number) {
809-
return getNewInstance(arg, pathToItem, pathToSchemas)
809+
return arg
810810
} else if (arg is String) {
811-
return getNewInstance(arg, pathToItem, pathToSchemas)
811+
return arg
812812
} else if (arg is List<*>) {
813813
return getNewInstance(arg, pathToItem, pathToSchemas)
814814
} else if (arg is Map<*, *>) {

samples/client/3_0_3_unit_test/kotlin/src/main/kotlin/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.kt

+12-12
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,13 @@ class AllofWithBaseSchema {
336336
}
337337
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
338338
if (arg == null) {
339-
return getNewInstance( null, pathToItem, pathToSchemas)
339+
return arg
340340
} else if (arg is Boolean) {
341-
return getNewInstance(arg, pathToItem, pathToSchemas)
341+
return arg
342342
} else if (arg is Number) {
343-
return getNewInstance(arg, pathToItem, pathToSchemas)
343+
return arg
344344
} else if (arg is String) {
345-
return getNewInstance(arg, pathToItem, pathToSchemas)
345+
return arg
346346
} else if (arg is List<*>) {
347347
return getNewInstance(arg, pathToItem, pathToSchemas)
348348
} else if (arg is Map<*, *>) {
@@ -700,13 +700,13 @@ class AllofWithBaseSchema {
700700
}
701701
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
702702
if (arg == null) {
703-
return getNewInstance( null, pathToItem, pathToSchemas)
703+
return arg
704704
} else if (arg is Boolean) {
705-
return getNewInstance(arg, pathToItem, pathToSchemas)
705+
return arg
706706
} else if (arg is Number) {
707-
return getNewInstance(arg, pathToItem, pathToSchemas)
707+
return arg
708708
} else if (arg is String) {
709-
return getNewInstance(arg, pathToItem, pathToSchemas)
709+
return arg
710710
} else if (arg is List<*>) {
711711
return getNewInstance(arg, pathToItem, pathToSchemas)
712712
} else if (arg is Map<*, *>) {
@@ -1092,13 +1092,13 @@ class AllofWithBaseSchema {
10921092
}
10931093
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
10941094
if (arg == null) {
1095-
return getNewInstance( null, pathToItem, pathToSchemas)
1095+
return arg
10961096
} else if (arg is Boolean) {
1097-
return getNewInstance(arg, pathToItem, pathToSchemas)
1097+
return arg
10981098
} else if (arg is Number) {
1099-
return getNewInstance(arg, pathToItem, pathToSchemas)
1099+
return arg
11001100
} else if (arg is String) {
1101-
return getNewInstance(arg, pathToItem, pathToSchemas)
1101+
return arg
11021102
} else if (arg is List<*>) {
11031103
return getNewInstance(arg, pathToItem, pathToSchemas)
11041104
} else if (arg is Map<*, *>) {

samples/client/3_0_3_unit_test/kotlin/src/main/kotlin/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,13 @@ class AllofWithOneEmptySchema {
265265
}
266266
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
267267
if (arg == null) {
268-
return getNewInstance( null, pathToItem, pathToSchemas)
268+
return arg
269269
} else if (arg is Boolean) {
270-
return getNewInstance(arg, pathToItem, pathToSchemas)
270+
return arg
271271
} else if (arg is Number) {
272-
return getNewInstance(arg, pathToItem, pathToSchemas)
272+
return arg
273273
} else if (arg is String) {
274-
return getNewInstance(arg, pathToItem, pathToSchemas)
274+
return arg
275275
} else if (arg is List<*>) {
276276
return getNewInstance(arg, pathToItem, pathToSchemas)
277277
} else if (arg is Map<*, *>) {

samples/client/3_0_3_unit_test/kotlin/src/main/kotlin/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,13 @@ class AllofWithTheFirstEmptySchema {
280280
}
281281
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
282282
if (arg == null) {
283-
return getNewInstance( null, pathToItem, pathToSchemas)
283+
return arg
284284
} else if (arg is Boolean) {
285-
return getNewInstance(arg, pathToItem, pathToSchemas)
285+
return arg
286286
} else if (arg is Number) {
287-
return getNewInstance(arg, pathToItem, pathToSchemas)
287+
return arg
288288
} else if (arg is String) {
289-
return getNewInstance(arg, pathToItem, pathToSchemas)
289+
return arg
290290
} else if (arg is List<*>) {
291291
return getNewInstance(arg, pathToItem, pathToSchemas)
292292
} else if (arg is Map<*, *>) {

0 commit comments

Comments
 (0)