-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
CLIENTS-286 CLIENTS-288 #560
Conversation
Documentation for SR delete API
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.
Mostly nits. The other thing that might be missing is an explanation that deleting a version does not delete the corresponding ID. Data can still be decoded, but the compatibility guarantees the schema registry normally enforces might no longer hold.
docs/api.rst
Outdated
@@ -164,6 +164,38 @@ The subjects resource provides a list of all registered subjects in your schema | |||
1, 2, 3, 4 | |||
] | |||
|
|||
.. http:delete:: /subjects/(string: subject) | |||
|
|||
Deletes the specified subject and its associated compatibility level if registered. It is recommended to use this API only in development environments. In production environments, it must be use with care as it would delete all the registered schemas for the subject. One of the potential scenario to use in production is when a topic needs to be recycled. |
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.
must be use -> must be used
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.
potential scenario -> potential scenarios
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.
Maybe reword the recommendation to include the recycling case. It's kind of confusing right now since it says "only use in development", then gives an example of using it in production.
docs/api.rst
Outdated
@@ -332,6 +364,40 @@ The subjects resource provides a list of all registered subjects in your schema | |||
}" | |||
} | |||
|
|||
.. http:delete:: /subjects/(string: subject)/versions/(versionId: version) | |||
|
|||
deletes a specific version of the schema registered under this subject. This API is recommended to be used only in development environments or under extreme circumstances where-in, its required to delete a previously registered schema for compatibility purposes or re-register previously registered schema |
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.
Capitalize deletes
docs/intro.rst
Outdated
@@ -47,13 +47,21 @@ Start by running the Schema Registry and the services it depends on: ZooKeeper a | |||
$ curl -X GET http://localhost:8081/subjects/Kafka-value/versions | |||
[1] | |||
|
|||
# Deletes all schema versions registered under the subject "Kafka-value" | |||
$ curl -X DELETE http://localhost:8081/subjects/Kafka-value |
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 we delete the entire subject here, the subsequent commands wouldn't work, i.e. if someone followed each of these commands, they wouldn't get the output that is shown. Perhaps move deletion to the end and then verify with a GET
to fully demonstrate the functionality?
docs/schema-deletion-guidelines.rst
Outdated
Schema Deletion Guidelines | ||
========================== | ||
|
||
Schema Registry API supports deleting a specific schema version and also a delete subject (deletes all schema versions for the subject). |
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.
-> a specific schema version or all versions in a subject.
docs/schema-deletion-guidelines.rst
Outdated
$ curl -X DELETE http://localhost:8081/subjects/Kafka-value/versions/latest | ||
1 | ||
|
||
The above API's are primarily intended to be used be in development environment where its common to go through iterations before finalizing a schema. While its not recommended to be used in a production environment, there are few scenarios where these API's can be used in production but with utmost care. |
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.
its -> it's
docs/api.rst
Outdated
|
||
.. sourcecode:: http | ||
|
||
DELETE /subjects/test/versions HTTP/1.1 |
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.
Should this just be /subjects/test
?
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.
that's true..fixing it
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.
LGTM
Documentation for SR delete API