Support catalog register new schema version#1246
Merged
jfallows merged 4 commits intoaklivity:developfrom Sep 16, 2024
Merged
Conversation
jfallows
requested changes
Sep 13, 2024
| 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"; |
Contributor
Author
There was a problem hiding this comment.
Nope, no slash required. Spec is also correct accept "http://localhost:8081/subjects/items-snapshots-value/versions"
Contributor
There was a problem hiding this comment.
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?
Contributor
Author
There was a problem hiding this comment.
oh I see what you mean I got it wrong yep :)
Comment on lines
+65
to
+71
| default int register( | ||
| String subject, | ||
| String schema) | ||
| { | ||
| return NO_VERSION_ID; | ||
| } | ||
|
|
| catalog: | ||
| catalog0: | ||
| - subject: items-snapshots-value | ||
| record: | |
Contributor
There was a problem hiding this comment.
record is something else, this should be schema.
Comment on lines
+350
to
+353
| if (catalog.subject != null && catalog.record != null) | ||
| { | ||
| handler.register(catalog.subject, catalog.record); | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| 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); | |
| } |
jfallows
previously approved these changes
Sep 13, 2024
jfallows
approved these changes
Sep 16, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Support catalog register new schema version.
Fixes #1060