|
|
@ -1587,52 +1587,47 @@ TypeResult resolveType( |
|
|
|
} |
|
|
|
} |
|
|
|
case 'object': |
|
|
|
case 'object': |
|
|
|
if (schema.properties == null) { |
|
|
|
if (schema.properties == null) { |
|
|
|
if (schema.additionalProperties != null) { |
|
|
|
if (schema.additionalProperties == null) { |
|
|
|
if (schema.additionalProperties is EmptySchema) { |
|
|
|
result = TypeResultBase( |
|
|
|
result = TypeResultMap( |
|
|
|
'JsonObject', |
|
|
|
'BuiltMap', |
|
|
|
nullable: nullable, |
|
|
|
TypeResultBase('JsonObject'), |
|
|
|
); |
|
|
|
nullable: nullable, |
|
|
|
} else if (schema.additionalProperties is EmptySchema) { |
|
|
|
); |
|
|
|
result = TypeResultMap( |
|
|
|
} else { |
|
|
|
'BuiltMap', |
|
|
|
final subResult = resolveType( |
|
|
|
TypeResultBase('JsonObject'), |
|
|
|
spec, |
|
|
|
nullable: nullable, |
|
|
|
variablePrefix, |
|
|
|
); |
|
|
|
state, |
|
|
|
} else { |
|
|
|
identifier, |
|
|
|
final subResult = resolveType( |
|
|
|
schema.additionalProperties!, |
|
|
|
spec, |
|
|
|
); |
|
|
|
variablePrefix, |
|
|
|
result = TypeResultMap( |
|
|
|
state, |
|
|
|
'BuiltMap', |
|
|
|
identifier, |
|
|
|
subResult, |
|
|
|
schema.additionalProperties!, |
|
|
|
nullable: nullable, |
|
|
|
); |
|
|
|
); |
|
|
|
result = TypeResultMap( |
|
|
|
} |
|
|
|
'BuiltMap', |
|
|
|
break; |
|
|
|
subResult, |
|
|
|
|
|
|
|
nullable: nullable, |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
result = TypeResultBase( |
|
|
|
} else if (schema.properties!.isEmpty) { |
|
|
|
'JsonObject', |
|
|
|
|
|
|
|
nullable: nullable, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (schema.properties!.isEmpty) { |
|
|
|
|
|
|
|
result = TypeResultMap( |
|
|
|
result = TypeResultMap( |
|
|
|
'BuiltMap', |
|
|
|
'BuiltMap', |
|
|
|
TypeResultBase('JsonObject'), |
|
|
|
TypeResultBase('JsonObject'), |
|
|
|
nullable: nullable, |
|
|
|
nullable: nullable, |
|
|
|
); |
|
|
|
); |
|
|
|
break; |
|
|
|
} else { |
|
|
|
|
|
|
|
result = resolveObject( |
|
|
|
|
|
|
|
spec, |
|
|
|
|
|
|
|
variablePrefix, |
|
|
|
|
|
|
|
state, |
|
|
|
|
|
|
|
identifier, |
|
|
|
|
|
|
|
schema, |
|
|
|
|
|
|
|
nullable: nullable, |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
result = resolveObject( |
|
|
|
|
|
|
|
spec, |
|
|
|
|
|
|
|
variablePrefix, |
|
|
|
|
|
|
|
state, |
|
|
|
|
|
|
|
identifier, |
|
|
|
|
|
|
|
schema, |
|
|
|
|
|
|
|
nullable: nullable, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|