From 5b88e586876e67048532bc74b7f26e5e49e20c28 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Fri, 15 Sep 2023 22:23:26 +0200 Subject: [PATCH] fix(dynamite): supported file extensions Signed-off-by: Nikolas Rimikis --- packages/dynamite/dynamite/lib/src/openapi_builder.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/dynamite/dynamite/lib/src/openapi_builder.dart b/packages/dynamite/dynamite/lib/src/openapi_builder.dart index a3af8666..c675c6b2 100644 --- a/packages/dynamite/dynamite/lib/src/openapi_builder.dart +++ b/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)!, ),