Skip to content

Commit

Permalink
fix: Test Compatibility returns true when schema missing
Browse files Browse the repository at this point in the history
To make the api compatible with Confluent Schema Registry, testing the schema compatibility should return "true" wheneber the subject, schema or the version is missing
  • Loading branch information
Enis Mustafaj authored and Enis Mustafaj committed Oct 30, 2024
1 parent 8e3d735 commit c252a24
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/karapace/schema_registry_apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1354,14 +1354,8 @@ def get_old_schema(self, subject: Subject, version: Version, content_type: str)
except InvalidVersion:
self._invalid_version(content_type, version)
except (VersionNotFoundException, SchemasNotFoundException, SubjectNotFoundException):
self.r(
body={
"error_code": SchemaErrorCodes.VERSION_NOT_FOUND.value,
"message": f"Version {version} not found.",
},
content_type=content_type,
status=HTTPStatus.NOT_FOUND,
)
self.r({"is_compatible": True}, content_type)

old_schema_type = self._validate_schema_type(content_type=content_type, data=old)
try:
old_references = old.get("references", None)
Expand Down

0 comments on commit c252a24

Please sign in to comment.