|
|
@ -727,6 +727,8 @@ class OpenAPIBuilder implements Builder { |
|
|
|
parameter.schema!, |
|
|
|
parameter.schema!, |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
state.resolvedTypeCombinations.add(result); |
|
|
|
|
|
|
|
|
|
|
|
if (result.name == 'String') { |
|
|
|
if (result.name == 'String') { |
|
|
|
if (parameter.schema?.pattern != null) { |
|
|
|
if (parameter.schema?.pattern != null) { |
|
|
|
code.write(''' |
|
|
|
code.write(''' |
|
|
@ -1016,7 +1018,11 @@ class OpenAPIBuilder implements Builder { |
|
|
|
'$name,', |
|
|
|
'$name,', |
|
|
|
], |
|
|
|
], |
|
|
|
'])', |
|
|
|
'])', |
|
|
|
r'final Serializers serializers = _$serializers;', |
|
|
|
r'final Serializers serializers = (_$serializers.toBuilder()', |
|
|
|
|
|
|
|
for (final type in state.resolvedTypeCombinations) ...[ |
|
|
|
|
|
|
|
...type.builderFactories, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
').build();', |
|
|
|
'', |
|
|
|
'', |
|
|
|
'final Serializers jsonSerializers = (serializers.toBuilder()..addPlugin(StandardJsonPlugin())..addPlugin(const ContentStringPlugin())).build();', |
|
|
|
'final Serializers jsonSerializers = (serializers.toBuilder()..addPlugin(StandardJsonPlugin())..addPlugin(const ContentStringPlugin())).build();', |
|
|
|
'', |
|
|
|
'', |
|
|
@ -1228,6 +1234,7 @@ class State { |
|
|
|
final resolvedTypes = <String>[]; |
|
|
|
final resolvedTypes = <String>[]; |
|
|
|
final registeredJsonObjects = <String>[]; |
|
|
|
final registeredJsonObjects = <String>[]; |
|
|
|
final output = <Spec>[]; |
|
|
|
final output = <Spec>[]; |
|
|
|
|
|
|
|
final resolvedTypeCombinations = <TypeResult>[]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TypeResult resolveObject( |
|
|
|
TypeResult resolveObject( |
|
|
|