@ -726,7 +726,7 @@ class OpenAPIBuilder implements Builder {
),
parameter.schema!,
nullable: dartParameterNullable,
);
).dartType;
state.resolvedTypeCombinations.add(result);
@ -42,4 +42,18 @@ class TypeResultBase extends TypeResult {
throw Exception('Can not decode "$name" from String');
}
@override
TypeResultBase get dartType {
final String dartName;
switch (name) {
case 'JsonObject':
dartName = 'dynamic';
break;
default:
dartName = name;
return TypeResultBase(dartName, nullable: nullable);
@ -41,4 +41,7 @@ class TypeResultList extends TypeResult {
String decode(final String object) => 'json.decode($object as String)';
TypeResultList get dartType => TypeResultList('List', subType, nullable: nullable);
@ -37,4 +37,7 @@ class TypeResultMap extends TypeResult {
TypeResultMap get dartType => TypeResultMap('Map', subType, nullable: nullable);
@ -59,4 +59,8 @@ abstract class TypeResult {
});
String get nullableName => nullable ? '$name?' : name;
/// Native dart type equivalent
// ignore: avoid_returning_this
TypeResult get dartType => this;