- Fix: Support trailing star-style comments (
/* hi */
) on enum values and fields.
- Fix: Support uppercase "X" for hexademical notation prefix (e.g., "0XDEADBEEF").
- Fix: Correctly handle equals sign between the 'syntax' keyword and its value.
- New: Rewritten model to more accurately reflect the proto schema.
- New:
DataType
interface and classes for representing type declarations. - New: Model classes all have a builder for creating instances.
- New:
toSchema()
method renders model objects as proto schema. - New: Support for
oneof
,map
, andany
types. - New: Support for
syntax
declarations. - New: Option values are now always represented as a string, list, or map. The
kind()
of an option instance reflects the inferred type. This allows for correct representation of unsigned numbers and unknown enum values without special handling.
- Fix: Honor the 'allow_alias' option when validating value tag uniqueness in enums.
- Fix: Format multiple options on an enum value correctly in
toString()
output. - Fix: Add support for int, enum, and boolean option value types.
- Fix: Preserve parenthesis specified around option names.
- Fix: Enum duplicate scope check now correctly checks name instead of tag value.
- Fix: Avoid NPE on deprecated, packed, and default field methods.
- Fix: Extend declarations that are nested in other types are now properly supported.
- Fix: Special-case Google's protobuf descriptors from the enum value constraint.
- New:
ScalarTypes
class with constants for each scalar type andisScalarType
method. - New: Field values are now validated to be unique in their message.
- New: Enum values are now validated to be unique in their parent scope.
- New:
Option.findByName
convenience method for pulling options out of a list. - Fix: Correct parsing problem where the character immediately after a
;
was ignored.
- New: Support for public imports.
- New:
toString
emits valid proto syntax. - New: Services and enums now support type-level options.
- New: Tag values are now checked to be valid.
- New: All models now have public constructors.
- New:
Type
now includes options list and documentation. - Options are now always presented as a list. Use
Option.optionsToMap
convenience method to convert them into a tree structure. - Fix:
equals
andhashCode
for all models now properly checks all values.
- New: Field options are available directly as a list.
- New: Parse options defined on enum values.
- Fix: Correctly parse option maps that lack commas.
- Fix: Preserve leading whitespace on comments.
- Fix: Disallow tag values less than or equal to zero.
- Fix: Properly aggregate repeated option values.
- Fix: Preserve square brackets in option names which denote extensions.
- New: Support for values as lists.
- New: Convenience methods for parsing from a
Reader
orInputStream
.
- New: Support for message options.
- Fix: Properly parse escapes in quoted strings.
- New: Support for fully-qualified names and extensions.
- Fields on messages inside of extensions are now parsed properly.
- Package is now
com.squareup.protoparser
.
- New: Parse RPC service definitions.
Initial release.