File tree Expand file tree Collapse file tree
goworkspace/internal/protowit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const (
1212 unsupportedParameter unsupportedReason = iota + 1
1313 unsupportedPackage
1414 unsupportedEnum
15- unsupportedOneofShape
15+ invalidOneofShape
1616 unsupportedMap
1717 unsupportedFieldKind
1818 unsupportedMessageReference
@@ -48,8 +48,8 @@ func (r unsupportedReason) String() string {
4848 return "protobuf package must contain a namespace and name"
4949 case unsupportedEnum :
5050 return "enums are not supported"
51- case unsupportedOneofShape :
52- return "oneof shape is not supported "
51+ case invalidOneofShape :
52+ return "oneof shape is invalid "
5353 case unsupportedMap :
5454 return "maps are not supported"
5555 case unsupportedFieldKind :
Original file line number Diff line number Diff line change @@ -477,7 +477,7 @@ func buildVariant(
477477 if oneof .Fields ().Len () == 0 {
478478 return witVariant {}, & schemaError {
479479 element : oneof .FullName (),
480- reason : unsupportedOneofShape ,
480+ reason : invalidOneofShape ,
481481 detail : "oneof must contain at least one member" ,
482482 }
483483 }
@@ -498,7 +498,7 @@ func buildVariant(
498498 if field .Cardinality () == protoreflect .Repeated {
499499 return witVariant {}, & schemaError {
500500 element : field .FullName (),
501- reason : unsupportedOneofShape ,
501+ reason : invalidOneofShape ,
502502 detail : "oneof members cannot be repeated" ,
503503 }
504504 }
You can’t perform that action at this time.
0 commit comments