avro-schema-registry
avro-schema-registry copied to clipboard
Subject name cannot start with a number (does not conform with Confluent SR).
When I register a new schema under the subject which name starts with a number, I get 404 response.
Request:
POST https://avro-schema-registry.salsify.com/subjects/1startswithnumber/versions
Content-Type: application/json
Authorization: Basic YXZybzphdnJv
{
"schema": "{\"type\":\"string\"}"
}
Response:
404 Not Found
With the subject starting with character, it works:
Request:
POST https://avro-schema-registry.salsify.com/subjects/startswithcharacter/versions
Content-Type: application/json
Authorization: Basic YXZybzphdnJv
{
"schema": "{\"type\":\"string\"}"
}
Response:
{
"id": 2
}
In comparison, Confluent Schema Registry accepts subjects with names starting with numbers.
The convention we were using when we developed this registry was to register schemas with the name of the Avro schema, and Avro schema names cannot begin with digits.
I don't think that it would be problematic to change this, but that is the context for the current behavior.
Hm.. good point, I did not think about it. What do you think about changing the current behavior? I feel like there are two ways:
- Add docs about this particular difference to Confluent way and add error handling propagating explanatory error message and code,
- Changing the behavior.
I am very-very new to Ruby, but I would like to contribute.