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)!, ),