-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support catalog register new schema version #1246
Conversation
@@ -42,6 +42,7 @@ | |||
public class SchemaRegistryCatalogHandler implements CatalogHandler | |||
{ | |||
private static final String SUBJECT_VERSION_PATH = "/subjects/{0}/versions/{1}"; | |||
private static final String SUBJECT_PATH = "subjects/{0}/versions"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing leading slash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, no slash required. Spec is also correct accept "http://localhost:8081/subjects/items-snapshots-value/versions"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does SUBJECT_VERSION_PATH
start with /subjects/...
but SUBJECT_PATH
starts with subjects/...
?
Seems like these should be consistent, and paths tend to start with /
, no?
It's possible that the HTTP client is conveniently injecting the /
for us as a workaround for missing leading slash perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I see what you mean I got it wrong yep :)
default int register( | ||
String subject, | ||
String schema) | ||
{ | ||
return NO_VERSION_ID; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent.
catalog: | ||
catalog0: | ||
- subject: items-snapshots-value | ||
record: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
record
is something else, this should be schema
.
if (catalog.subject != null && catalog.record != null) | ||
{ | ||
handler.register(catalog.subject, catalog.record); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (catalog.subject != null && catalog.record != null) | |
{ | |
handler.register(catalog.subject, catalog.record); | |
} | |
if (catalog.subject != null && catalog.schema != null) | |
{ | |
handler.register(catalog.subject, catalog.schema); | |
} |
Description
Support catalog register new schema version.
Fixes #1060