Browse Source

Merge pull request #772 from nextcloud/fix/dynamite

fix(dynamite): supported file extensions
pull/777/head
Nikolas Rimikis 1 year ago committed by GitHub
parent
commit
d1d4f6a36c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/dynamite/dynamite/lib/src/openapi_builder.dart

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

@ -34,11 +34,11 @@ class OpenAPIBuilder implements Builder {
);
final spec = switch (inputId.extension) {
'json' => serializers.deserializeWith(
'.json' => serializers.deserializeWith(
OpenAPI.serializer,
json.decode(await buildStep.readAsString(inputId)),
)!,
'yaml' => checkedYamlDecode(
'.yaml' => checkedYamlDecode(
await buildStep.readAsString(inputId),
(final m) => serializers.deserializeWith(OpenAPI.serializer, m)!,
),

Loading…
Cancel
Save