diff --git a/internal/bundles/assets/import_proto_cli.arraiz b/internal/bundles/assets/import_proto_cli.arraiz index 62553bcc..d17bbc27 100644 Binary files a/internal/bundles/assets/import_proto_cli.arraiz and b/internal/bundles/assets/import_proto_cli.arraiz differ diff --git a/pkg/importer/proto/proto_to_sysl.arrai b/pkg/importer/proto/proto_to_sysl.arrai index 0f0f3c11..b526ad82 100644 --- a/pkg/importer/proto/proto_to_sysl.arrai +++ b/pkg/importer/proto/proto_to_sysl.arrai @@ -56,7 +56,7 @@ let typeNameWithPrefix = \typeName \prefix # `scope` the current scope containing the messages with type definitions. # `prefix` the prefix to use if the type is found in the current scope. let referencedType = \t \file \appName \imports \scope \prefix - let usePrefix = cond { scope.messages?(t.name)?:{}: prefix }; + let usePrefix = cond { scope.messages?(t.name)?:{} || scope.enums?(t.name)?:{}: prefix }; let name = typeNameWithPrefix(t.name, usePrefix); # `referencedNs` finds the file that had the original type definition and returns the namespace of that file. let referencedNs = \t \file \imports diff --git a/pkg/importer/proto/tests/google.sysl b/pkg/importer/proto/tests/google.sysl index d62f408c..60ae38ee 100644 --- a/pkg/importer/proto/tests/google.sysl +++ b/pkg/importer/proto/tests/google.sysl @@ -250,7 +250,7 @@ google_protobuf: @description =: | A single field of a message type. @source_path = "google/protobuf/type.proto" - cardinality <: Cardinality: + cardinality <: Field_Cardinality: @description =: | The field cardinality. @json_tag = "cardinality" @@ -265,7 +265,7 @@ google_protobuf: | The field JSON name. @json_tag = "jsonName" @rpcId = "10" - kind <: Kind: + kind <: Field_Kind: @description =: | The field type. @json_tag = "kind"