Browse Source

dynamite: remove extraJsonSerializableValues

Signed-off-by: Nikolas Rimikis <rimikis.nikolas@gmail.com>
pull/194/head
Nikolas Rimikis 2 years ago
parent
commit
9dfb84453c
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 12
      packages/dynamite/lib/src/openapi_builder.dart

12
packages/dynamite/lib/src/openapi_builder.dart

@ -920,9 +920,6 @@ class OpenAPIBuilder implements Builder {
}, },
}, },
), ),
extraJsonSerializableValues: {
'disallowUnrecognizedKeys': 'false',
},
extraJsonKeyValues: { extraJsonKeyValues: {
for (final headerName in response.headers!.keys) ...{ for (final headerName in response.headers!.keys) ...{
headerName.toLowerCase(): { headerName.toLowerCase(): {
@ -1453,7 +1450,6 @@ TypeResult resolveObject(
final State state, final State state,
final String identifier, final String identifier,
final Schema schema, { final Schema schema, {
required final Map<String, String>? extraJsonSerializableValues,
required final Map<String, Map<String, String>>? extraJsonKeyValues, required final Map<String, Map<String, String>>? extraJsonKeyValues,
}) { }) {
if (!state.resolvedTypes.contains('${state.prefix}$identifier')) { if (!state.resolvedTypes.contains('${state.prefix}$identifier')) {
@ -1523,7 +1519,6 @@ TypeResult resolveObject(
state, state,
'${identifier}_${_toDartName(propertyName, uppercaseFirstCharacter: true)}', '${identifier}_${_toDartName(propertyName, uppercaseFirstCharacter: true)}',
propertySchema, propertySchema,
extraJsonSerializableValues: extraJsonSerializableValues,
); );
b b
@ -1632,7 +1627,6 @@ TypeResult resolveType(
final State state, final State state,
final String identifier, final String identifier,
final Schema schema, { final Schema schema, {
final Map<String, String>? extraJsonSerializableValues,
final Map<String, Map<String, String>>? extraJsonKeyValues, final Map<String, Map<String, String>>? extraJsonKeyValues,
final bool ignoreEnum = false, final bool ignoreEnum = false,
}) { }) {
@ -1647,7 +1641,6 @@ TypeResult resolveType(
state, state,
name, name,
spec.components!.schemas![name]!, spec.components!.schemas![name]!,
extraJsonSerializableValues: extraJsonSerializableValues,
); );
} else if (schema.ofs != null) { } else if (schema.ofs != null) {
if (!state.resolvedTypes.contains('${state.prefix}$identifier')) { if (!state.resolvedTypes.contains('${state.prefix}$identifier')) {
@ -1659,7 +1652,6 @@ TypeResult resolveType(
state, state,
'$identifier${schema.ofs!.indexOf(s)}', '$identifier${schema.ofs!.indexOf(s)}',
s, s,
extraJsonSerializableValues: extraJsonSerializableValues,
), ),
) )
.toList(); .toList();
@ -1930,7 +1922,6 @@ TypeResult resolveType(
state, state,
identifier, identifier,
schema.items!, schema.items!,
extraJsonSerializableValues: extraJsonSerializableValues,
); );
result = TypeResultList( result = TypeResultList(
'BuiltList<${subResult.name}>', 'BuiltList<${subResult.name}>',
@ -1957,7 +1948,6 @@ TypeResult resolveType(
state, state,
identifier, identifier,
schema.additionalProperties!, schema.additionalProperties!,
extraJsonSerializableValues: extraJsonSerializableValues,
); );
result = TypeResultMap( result = TypeResultMap(
'BuiltMap<String, ${subResult.name}>', 'BuiltMap<String, ${subResult.name}>',
@ -1982,7 +1972,6 @@ TypeResult resolveType(
state, state,
identifier, identifier,
schema, schema,
extraJsonSerializableValues: extraJsonSerializableValues,
extraJsonKeyValues: extraJsonKeyValues, extraJsonKeyValues: extraJsonKeyValues,
); );
break; break;
@ -2022,7 +2011,6 @@ TypeResult resolveType(
'$identifier${_toDartName(value.toString(), uppercaseFirstCharacter: true)}', '$identifier${_toDartName(value.toString(), uppercaseFirstCharacter: true)}',
schema, schema,
ignoreEnum: true, ignoreEnum: true,
extraJsonSerializableValues: extraJsonSerializableValues,
); );
b b
..name = _toDartName(value.toString()) ..name = _toDartName(value.toString())

Loading…
Cancel
Save