Skip to content

Commit

Permalink
Any Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
daemonl committed Feb 15, 2024
1 parent f9886f5 commit cb64078
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gogen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ func (bb *builder) buildTypeName(schema *schema_j5pb.Schema) (*DataType, error)
Pointer: true,
}, nil

case *schema_j5pb.Schema_Any:
return &DataType{
Name: "interface{}",
Pointer: false,
}, nil

case *schema_j5pb.Schema_StringItem:
item := schemaType.StringItem
if item.Format == nil {
Expand Down Expand Up @@ -249,7 +255,7 @@ func (bb *builder) buildTypeName(schema *schema_j5pb.Schema) (*DataType, error)
}, nil

default:
return nil, fmt.Errorf("Unknown type: %T\n", schema.Type)
return nil, fmt.Errorf("Unknown type for Go Gen: %T\n", schema.Type)
}

}
Expand Down

0 comments on commit cb64078

Please sign in to comment.