michaeljmarshall commented on code in PR #18995:
URL: https://github.com/apache/pulsar/pull/18995#discussion_r1143544262


##########
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:
   How does this work if the schema is not currently bytes and someone wants to 
change it to bytes?



-- 
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