Closed nicolaferraro closed 3 months ago
Redpanda version: (use rpk version): v24.1.2
rpk version
Running a HTTP Delete towards the config/<subject> endpoint fails if the content-type is not specified (but the body is expected to be empty). It also returns a response slightly different from the Kafka schema registry.
config/<subject>
See:
$ curl -H "content-type: application/json" -i -X PUT -d '{"compatibility": "NONE"}' http://localhost:8072/config/example HTTP/1.1 200 OK Content-Length: 24 Content-Type: application/vnd.schemaregistry.v1+json Date: Mon, 17 Jun 2024 16:40:55 GMT Server: Seastar httpd {"compatibility":"NONE"} $ curl -i -X DELETE http://localhost:8072/config/example HTTP/1.1 415 Unsupported Media Type Content-Length: 53 Server: Seastar httpd Date: Mon, 17 Jun 2024 16:41:32 GMT Content-Type: application/vnd.schemaregistry.v1+json {"error_code":415,"message":"unsupported_media_type"} $ curl -H "content-type: application/json" -i -X DELETE http://localhost:8072/config/example HTTP/1.1 200 OK Content-Length: 29 Content-Type: application/vnd.schemaregistry.v1+json Date: Mon, 17 Jun 2024 16:42:00 GMT Server: Seastar httpd {"compatibilityLevel":"NONE"}
{"compatibility":"NONE"}
I.e. compatibility instead of compatibilityLevel, as we correctly state in the API schema:
compatibility
compatibilityLevel
"produces": ["application/vnd.schemaregistry.v1+json"], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/put_compatibility" } }
(put_compatibility instead of get_compatibility).
See also https://docs.confluent.io/platform/current/schema-registry/develop/api.html#delete--config-(string-%20subject).
JIRA Link: CORE-4204
For 2. the docs are incorrect. The behaviour is compatible.
Yeah, we should update our openAPI spec
Fixed by https://github.com/redpanda-data/redpanda/pull/19866
Version & Environment
Redpanda version: (use
rpk version
): v24.1.2What went wrong?
Running a HTTP Delete towards the
config/<subject>
endpoint fails if the content-type is not specified (but the body is expected to be empty). It also returns a response slightly different from the Kafka schema registry.See:
What should have happened instead?
I.e.
compatibility
instead ofcompatibilityLevel
, as we correctly state in the API schema:(put_compatibility instead of get_compatibility).
See also https://docs.confluent.io/platform/current/schema-registry/develop/api.html#delete--config-(string-%20subject).
How to reproduce the issue?
JIRA Link: CORE-4204