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

Kotlin removes unused methods #436

Merged
merged 4 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ so developers can use all of those features.

Currently, the following languages/frameworks are supported:

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

## Reasons To Use the Generators
- Openapi spec support for v3.0.0-3.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,13 +459,13 @@ class AdditionalpropertiesAreAllowedByDefault {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,13 @@ class AdditionalpropertiesShouldNotLookInApplicators {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down Expand Up @@ -728,13 +728,13 @@ class AdditionalpropertiesShouldNotLookInApplicators {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,13 @@ class Allof {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down Expand Up @@ -717,13 +717,13 @@ class Allof {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down Expand Up @@ -1001,13 +1001,13 @@ class Allof {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,13 @@ class AllofCombinedWithAnyofOneof {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down Expand Up @@ -519,13 +519,13 @@ class AllofCombinedWithAnyofOneof {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down Expand Up @@ -794,13 +794,13 @@ class AllofCombinedWithAnyofOneof {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down Expand Up @@ -1083,13 +1083,13 @@ class AllofCombinedWithAnyofOneof {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ class AllofSimpleTypes {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down Expand Up @@ -518,13 +518,13 @@ class AllofSimpleTypes {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down Expand Up @@ -802,13 +802,13 @@ class AllofSimpleTypes {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,13 @@ class AllofWithBaseSchema {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down Expand Up @@ -700,13 +700,13 @@ class AllofWithBaseSchema {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down Expand Up @@ -1092,13 +1092,13 @@ class AllofWithBaseSchema {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,13 @@ class AllofWithOneEmptySchema {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,13 @@ class AllofWithTheFirstEmptySchema {
}
override fun getNewInstance(arg: Any?, pathToItem: List<Any>, pathToSchemas: PathToSchemasMap): Any? {
if (arg == null) {
return getNewInstance( null, pathToItem, pathToSchemas)
return arg
} else if (arg is Boolean) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is Number) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is String) {
return getNewInstance(arg, pathToItem, pathToSchemas)
return arg
} else if (arg is List<*>) {
return getNewInstance(arg, pathToItem, pathToSchemas)
} else if (arg is Map<*, *>) {
Expand Down
Loading