coderzc opened a new issue, #16379: URL: https://github.com/apache/pulsar/issues/16379
**Describe the bug** Timestamp value 0 gets the scheme when using admin API. **To Reproduce** Steps to reproduce the behavior: 1. Start a pulsar version 2. Create a schema. ``` curl -X POST http://127.0.0.1:8080/admin/v2/schemas/public/default/test/schema -H "content-type:application/json" -d '{ "type" : "KEY_VALUE", "schema" : "{\"key\":{\"type\":\"record\",\"name\":\"Foo\",\"namespace\":\"org.apache.pulsar.broker.admin.AdminApiSchemaTest\",\"fields\":[{\"name\":\"intField\",\"type\":\"int\"}]},\"value\":{\"type\":\"record\",\"name\":\"Foo\",\"namespace\":\"org.apache.pulsar.broker.admin.AdminApiSchemaTest\",\"fields\":[{\"name\":\"intField\",\"type\":\"int\"}]}}", "properties" : { "key.schema.properties" : "{\"__alwaysAllowNull\":\"true\",\"__jsr310ConversionEnabled\":\"false\"}", "value.schema.properties" : "{\"__alwaysAllowNull\":\"true\",\"__jsr310ConversionEnabled\":\"false\"}", "value.schema.type" : "AVRO", "key.schema.name" : "", "value.schema.name" : "", "kv.encoding.type" : "INLINE", "key.schema.type" : "AVRO" } }' ``` Response: ``` {"version":{"version":0}} ``` 3. Get the schema. ``` curl -X GET http://127.0.0.1:8080/admin/v2/schemas/public/default/test/schema ``` Response: {"version":0,"type":"KEY_VALUE",***"timestamp":0,***"data":"{\"key\":{\"type\":\"record\",\"name\":\"Foo\",\"namespace\":\"org.apache.pulsar.broker.admin.AdminApiSchemaTest\",\"fields\":[{\"name\":\"intField\",\"type\":\"int\"}]},\"value\":{\"type\":\"record\",\"name\":\"Foo\",\"namespace\":\"org.apache.pulsar.broker.admin.AdminApiSchemaTest\",\"fields\":[{\"name\":\"intField\",\"type\":\"int\"}]}}","properties":{"key.schema.properties":"{\"__alwaysAllowNull\":\"true\",\"__jsr310ConversionEnabled\":\"false\"}","value.schema.properties":"{\"__alwaysAllowNull\":\"true\",\"__jsr310ConversionEnabled\":\"false\"}","value.schema.type":"AVRO","key.schema.name":"","value.schema.name":"","kv.encoding.type":"INLINE","key.schema.type":"AVRO"}} **Expected behavior** Get a correct timestamp value. **Desktop (please complete the following information):** - OS: macOS -- 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]
