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

CLIENTS-286 CLIENTS-288 #560

Merged
merged 3 commits into from
Jun 7, 2017
Merged

CLIENTS-286 CLIENTS-288 #560

merged 3 commits into from
Jun 7, 2017

Conversation

mageshn
Copy link
Member

@mageshn mageshn commented Jun 1, 2017

Documentation for SR delete API

Documentation for SR delete API
Copy link
Contributor

@ewencp ewencp left a 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.
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

potential scenario -> potential scenarios

Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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?

Schema Deletion Guidelines
==========================

Schema Registry API supports deleting a specific schema version and also a delete subject (deletes all schema versions for the subject).
Copy link
Contributor

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.

$ 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.
Copy link
Contributor

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
Copy link

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?

Copy link
Member Author

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

Copy link
Contributor

@ewencp ewencp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mageshn mageshn merged commit 1627199 into master Jun 7, 2017
@ewencp ewencp deleted the SR-DELETE-DOCS branch June 7, 2017 06:01
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

Successfully merging this pull request may close these issues.

None yet

3 participants