@goast/kotlin 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -369,6 +369,10 @@ class DefaultKotlinModelGenerator extends file_generator_1.KotlinFileGenerator {
|
|
|
369
369
|
schema.kind !== 'oneOf') {
|
|
370
370
|
return false;
|
|
371
371
|
}
|
|
372
|
+
// Too complex types cannot be represented in Kotlin, so they fallback to Any
|
|
373
|
+
if (schema.kind === 'combined' || schema.kind === 'multi-type' || schema.kind === 'oneOf') {
|
|
374
|
+
return false;
|
|
375
|
+
}
|
|
372
376
|
// Only object types with properties should have its own type declaration
|
|
373
377
|
if (schema.kind === 'object' &&
|
|
374
378
|
schema.properties.size === 0 &&
|
|
@@ -366,6 +366,10 @@ export class DefaultKotlinModelGenerator extends KotlinFileGenerator {
|
|
|
366
366
|
schema.kind !== 'oneOf') {
|
|
367
367
|
return false;
|
|
368
368
|
}
|
|
369
|
+
// Too complex types cannot be represented in Kotlin, so they fallback to Any
|
|
370
|
+
if (schema.kind === 'combined' || schema.kind === 'multi-type' || schema.kind === 'oneOf') {
|
|
371
|
+
return false;
|
|
372
|
+
}
|
|
369
373
|
// Only object types with properties should have its own type declaration
|
|
370
374
|
if (schema.kind === 'object' &&
|
|
371
375
|
schema.properties.size === 0 &&
|