Class ProtobufCompatibilityCheckerLibrary
- java.lang.Object
-
- io.apicurio.registry.rules.compatibility.protobuf.ProtobufCompatibilityCheckerLibrary
-
-
Constructor Summary
Constructors Constructor Description ProtobufCompatibilityCheckerLibrary(ProtobufFile fileBefore, ProtobufFile fileAfter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ProtobufDifference>
checkNoChangingFieldIDs()
Determine if any field ID number has been changed.List<ProtobufDifference>
checkNoChangingFieldNames()
Determine if any message's previous fields have been renamed.List<ProtobufDifference>
checkNoChangingFieldTypes()
Determine if any field type has been changed.List<ProtobufDifference>
checkNoChangingRPCSignature()
Determine if any RPC signature has been changed while using the same name.List<ProtobufDifference>
checkNoRemovingFieldsWithoutReserve()
Determine if any field has been removed without a corresponding reservation of that field name or ID.List<ProtobufDifference>
checkNoRemovingReservedFields()
Determine if any reserved field has been removed.List<ProtobufDifference>
checkNoRemovingServiceRPCs()
Determine if any RPCs provided by a Service have been removed.List<ProtobufDifference>
checkNoUsingReservedFields()
Determine if any message's previously reserved fields or IDs are now being used as part of the same message.List<ProtobufDifference>
findDifferences()
boolean
validate()
-
-
-
Constructor Detail
-
ProtobufCompatibilityCheckerLibrary
public ProtobufCompatibilityCheckerLibrary(ProtobufFile fileBefore, ProtobufFile fileAfter)
-
-
Method Detail
-
validate
public boolean validate()
-
findDifferences
public List<ProtobufDifference> findDifferences()
-
checkNoUsingReservedFields
public List<ProtobufDifference> checkNoUsingReservedFields()
Determine if any message's previously reserved fields or IDs are now being used as part of the same message.Note: TODO can't currently validate enum reserved fields, as the parser doesn't capture those.
- Returns:
- differences list
-
checkNoRemovingReservedFields
public List<ProtobufDifference> checkNoRemovingReservedFields()
Determine if any reserved field has been removed.Note: TODO can't currently validate enum reserved fields, as the parser doesn't capture those.
- Returns:
- differences list
-
checkNoRemovingFieldsWithoutReserve
public List<ProtobufDifference> checkNoRemovingFieldsWithoutReserve()
Determine if any field has been removed without a corresponding reservation of that field name or ID.Note: TODO can't currently validate enum reserved fields, as the parser doesn't capture those.
- Returns:
- differences list
-
checkNoChangingFieldIDs
public List<ProtobufDifference> checkNoChangingFieldIDs()
Determine if any field ID number has been changed.- Returns:
- differences list
-
checkNoChangingFieldTypes
public List<ProtobufDifference> checkNoChangingFieldTypes()
Determine if any field type has been changed.- Returns:
- differences list
-
checkNoChangingFieldNames
public List<ProtobufDifference> checkNoChangingFieldNames()
Determine if any message's previous fields have been renamed.- Returns:
- differences list
-
checkNoRemovingServiceRPCs
public List<ProtobufDifference> checkNoRemovingServiceRPCs()
Determine if any RPCs provided by a Service have been removed.- Returns:
- differences list
-
checkNoChangingRPCSignature
public List<ProtobufDifference> checkNoChangingRPCSignature()
Determine if any RPC signature has been changed while using the same name.- Returns:
- differences list
-
-