Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subject name cannot start with a number (does not conform with Confluent SR). #127

Open
mikalaisyty opened this issue Feb 19, 2019 · 2 comments

Comments

@mikalaisyty
Copy link

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.

@tjwp
Copy link
Collaborator

tjwp commented Feb 19, 2019

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.

@mikalaisyty
Copy link
Author

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:

  1. Add docs about this particular difference to Confluent way and add error handling propagating explanatory error message and code,
  2. Changing the behavior.

I am very-very new to Ruby, but I would like to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants