Skip to content

Commit

Permalink
clarify a typo and a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vchudnov-g committed Oct 9, 2024
1 parent f9bc872 commit 3c89106
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ private Field schemaToField(Schema sch, boolean optional, String debugPreviousPa
if (sch.format() == Format.STRUCT) {
valueType = Message.PRIMITIVES.get("google.protobuf.Struct");
this.usesStructProto = true;
// `additionalProperties' in the schema further specified the JSON format, but
// `additionalProperties' in the schema further specifies the JSON format, but
// "google.protobuf.Struct" is enough for specifying the proto message field type.
} else {
if (sch.additionalProperties() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ public class Message extends ProtoElement<Message> {
PRIMITIVES.put("double", new Message("double", false, false, null));
PRIMITIVES.put("", new Message("", false, true, null));

// This isn't technically a primitive, but it is a fundamental well-known-type with no a priori
// structure.
// These aren't technically primitives, but they are opaque types we treat as such, essentially.
//
// TODO: If we start accepting additional well-known types, create a specific data structure for
// those rather than overloading "PRIMITIVES".
// TODO: Consider renaming this field more accurately, or creating a parallel field for these
// types.
PRIMITIVES.put("google.protobuf.Any", new Message("google.protobuf.Any", false, false, null));
PRIMITIVES.put(
"google.protobuf.Value", new Message("google.protobuf.Value", false, false, null));
Expand Down

0 comments on commit 3c89106

Please sign in to comment.