|
|
@ -33,9 +33,7 @@ class OpenAPIBuilder implements Builder { |
|
|
|
if (spec.paths != null) ...{ |
|
|
|
if (spec.paths != null) ...{ |
|
|
|
for (final pathItem in spec.paths!.values) ...{ |
|
|
|
for (final pathItem in spec.paths!.values) ...{ |
|
|
|
for (final operation in pathItem.operations.values) ...{ |
|
|
|
for (final operation in pathItem.operations.values) ...{ |
|
|
|
if (operation.tags != null) ...{ |
|
|
|
...?operation.tags, |
|
|
|
...operation.tags!, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
@ -518,9 +516,7 @@ class OpenAPIBuilder implements Builder { |
|
|
|
]) |
|
|
|
]) |
|
|
|
..body = const Code(''' |
|
|
|
..body = const Code(''' |
|
|
|
this.baseHeaders = { |
|
|
|
this.baseHeaders = { |
|
|
|
if (baseHeaders != null) ...{ |
|
|
|
...?baseHeaders, |
|
|
|
...baseHeaders, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
this.httpClient = (httpClient ?? HttpClient())..userAgent = userAgent; |
|
|
|
this.httpClient = (httpClient ?? HttpClient())..userAgent = userAgent; |
|
|
|
'''), |
|
|
|
'''), |
|
|
@ -670,12 +666,7 @@ class OpenAPIBuilder implements Builder { |
|
|
|
|
|
|
|
|
|
|
|
final acceptHeader = operation.responses?.values |
|
|
|
final acceptHeader = operation.responses?.values |
|
|
|
.map((final response) => response.content?.keys) |
|
|
|
.map((final response) => response.content?.keys) |
|
|
|
.reduce( |
|
|
|
.reduce((final a, final b) => [...?a, ...?b]) |
|
|
|
(final a, final b) => [ |
|
|
|
|
|
|
|
...a ?? [], |
|
|
|
|
|
|
|
...b ?? [], |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
?.toSet() |
|
|
|
?.toSet() |
|
|
|
.join(','); |
|
|
|
.join(','); |
|
|
|
final code = StringBuffer(''' |
|
|
|
final code = StringBuffer(''' |
|
|
|