Commit f813bd9f authored by Thomas Van Lenten's avatar Thomas Van Lenten

Add a swift_prefix file option.

Swift generators should default to CamelCasing the proto package and prefixing
symbols with that, but this option allows developers to override that behavior
with something custom if they desire.

Fixes https://github.com/google/protobuf/issues/1833
parent 39f9b432
This diff is collapsed.
This diff is collapsed.
...@@ -366,6 +366,12 @@ message FileOptions { ...@@ -366,6 +366,12 @@ message FileOptions {
// Namespace for generated classes; defaults to the package. // Namespace for generated classes; defaults to the package.
optional string csharp_namespace = 37; optional string csharp_namespace = 37;
// By default Swift generators will take the proto package and CamelCase it
// replacing '.' with underscore and use that to prefix the types/symbols
// defined. When this options is provided, they will use this value instead
// to prefix the types/symbols defined.
optional string swift_prefix = 39;
// The parser stores options it doesn't recognize here. See above. // The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999; repeated UninterpretedOption uninterpreted_option = 999;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment