Skip to content

Commit 362773a

Browse files
committed
[dart][dart-dio] Support OpenAPI 3.1 composed schemas
1 parent 760d5e8 commit 362773a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import com.google.common.collect.Sets;
44
import io.swagger.v3.oas.models.Operation;
5-
import io.swagger.v3.oas.models.media.ComposedSchema;
65
import io.swagger.v3.oas.models.media.Schema;
76
import io.swagger.v3.oas.models.media.StringSchema;
87
import io.swagger.v3.oas.models.servers.Server;
@@ -593,7 +592,7 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required) {
593592

594593
// Handle composed properties and it's NOT allOf with a single ref only
595594
if (ModelUtils.isComposedSchema(p) && !(ModelUtils.isAllOf(p) && p.getAllOf().size() == 1)) {
596-
ComposedSchema composed = (ComposedSchema) p;
595+
Schema<Object> composed = (Schema<Object>) p;
597596

598597
// Count the occurrences of allOf/anyOf/oneOf with exactly one child element
599598
long count = Stream.of(composed.getAllOf(), composed.getAnyOf(), composed.getOneOf())

0 commit comments

Comments
 (0)