You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/10 20:26:46 UTC

[GitHub] [pulsar] MaksymSlobodianyk opened a new issue #12010: Pulsar standalone console should print better error message when schema is invalid

MaksymSlobodianyk opened a new issue #12010:
URL: https://github.com/apache/pulsar/issues/12010


   **Is your enhancement request related to a problem? Please describe.**
   A clear and concise description of what the enhancement is.
   
   I'm trying to POST a Pulsar schema using Admin API. But always get 500 Error without any helpful explanation why does it happening:
   Unfortunately, the documentation doesn't contain any example of the correct protobuf schema format for passing into the API.
   
   Here is a payload that I pass into the API:
   
   `
       {
          "type": "PROTOBUF", 
          "schema": "syntax = \"proto3\";\n\npackage com.mycorp.mynamespace;\n\nimport 'google/protobuf/any.proto';\n \nmessage SampleRecord { \n\n  int32 my_field1 = 1; \n  double my_field2 = 2; \n  string my_field3 = 3; \n}", 
          "properties": {}
       }`
   
   And formatted message definition:
   
       syntax = "proto3";
        package com.mycorp.mynamespace;
       
       import 'google/protobuf/any.proto';
        
       message SampleRecord { 
         int32 my_field1 = 1; 
         double my_field2 = 2; 
         string my_field3 = 3; 
       }
   
   
   **Describe the solution you'd like**
   Please, add to documentation examples of payload for all schemas types
   
   **Describe alternatives you've considered**
   If anybody can advise a correct format of payload for this schema, this will be really helpful.
   
   **Additional context**
   I know that there is a PROTOBUF_NATIVE schema type, but I also found a PROTOBUF schema type in the source code of pulsar.
   
   Related:
   #10694
   


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



[GitHub] [pulsar] codelipenghui closed issue #12010: Pulsar standalone console should print better error message when schema is invalid

Posted by GitBox <gi...@apache.org>.
codelipenghui closed issue #12010:
URL: https://github.com/apache/pulsar/issues/12010


   


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