mattisonchao opened a new pull request, #25255:
URL: https://github.com/apache/pulsar/pull/25255

   ### Motivation
   
   Follow-up to #25193 as noted by @codelipenghui in [this review 
comment](https://github.com/apache/pulsar/pull/25193#pullrequestreview-2690299893).
   
   `JsonSchemaCompatibilityCheck.isAvroSchema()` still uses `new 
Schema.Parser()` with the default `UTF_VALIDATOR`, which rejects `$` in record 
names. This means JSON schema compatibility checks would incorrectly fail for 
Protobuf-derived Avro schemas containing `$` in nested type names.
   
   ### Modifications
   
   - Apply `StructSchemaDataValidator.COMPATIBLE_NAME_VALIDATOR` to the 
`Schema.Parser` in `JsonSchemaCompatibilityCheck.isAvroSchema()`, consistent 
with the fix already applied to:
     - `AvroSchemaBasedCompatibilityCheck`
     - `SchemaRegistryServiceImpl`
     - `StructSchemaDataValidator`
   - Add a unit test verifying that Avro schemas with `$` in record names are 
correctly recognized as valid Avro schemas in the JSON schema compatibility 
check path.
   
   ### Verifying this change
   
   - Added `testIsAvroSchemaWithDollarSignInRecordName` test in 
`JsonSchemaCompatibilityCheckTest`.
   
   ### Documentation
   
   - [x] `doc-not-needed`
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to