congbobo184 commented on code in PR #18995:
URL: https://github.com/apache/pulsar/pull/18995#discussion_r1148758635
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/SchemasResourceBase.java:
##########
@@ -114,6 +114,10 @@ public CompletableFuture<SchemaVersion>
deleteSchemaAsync(boolean authoritative,
}
public CompletableFuture<SchemaVersion> postSchemaAsync(PostSchemaPayload
payload, boolean authoritative) {
+ if (SchemaType.BYTES.name().equals(payload.getType())) {
+ return CompletableFuture.failedFuture(new
RestException(Response.Status.NOT_ACCEPTABLE,
+ "Do not upload a BYTES schema, because it's the default
schema type"));
+ }
Review Comment:
BYTES schema doesn't need to upload, when to create producer or consumer
with bytes schema, the broker will not check the schema compatibility check
--
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]