You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "Denovo1998 (via GitHub)" <gi...@apache.org> on 2023/03/26 12:27:12 UTC
[GitHub] [pulsar] Denovo1998 commented on a diff in pull request #18995: [fix][broker] forbid uploading BYTES schema with admin API
Denovo1998 commented on code in PR #18995:
URL: https://github.com/apache/pulsar/pull/18995#discussion_r1148544432
##########
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:
@michaeljmarshall I think you can delete all the current schemas of the topic. At this time, it's schema defaults 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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org