Skip to content

Comments

Support Schema Registry vendor-specific content types (application/vnd.schemaregistry.v1+json)#1643

Open
Copilot wants to merge 4 commits intomainfrom
copilot/fix-schema-registry-compatibility
Open

Support Schema Registry vendor-specific content types (application/vnd.schemaregistry.v1+json)#1643
Copilot wants to merge 4 commits intomainfrom
copilot/fix-schema-registry-compatibility

Conversation

Copy link

Copilot AI commented Jan 19, 2026

Warpstream Schema Registry Compatibility Fix

Problem

When using Kafka UI with WarpStream's Schema Registry, the Schema Registry tab fails to load consistently. The error occurs because WarpStream returns application/vnd.schemaregistry.v1+json content type, which is not supported by the current WebClient configuration that only accepts application/json.

Solution

Added support for Schema Registry vendor-specific content types in the WebClient configuration. This ensures compatibility with Confluent Schema Registry API standard content types that are used by WarpStream and other compatible implementations.

Plan

  • Analyze the issue and identify the root cause in WebClientConfigurator
  • Add support for Schema Registry vendor-specific content types in WebClientConfigurator
  • Update the schema registry WebClient configuration in KafkaClusterFactory to accept the new content types
  • Add unit tests for the new functionality
  • Run code review and security checks
  • Address code review feedback - use Stream.concat instead of System.arraycopy

Changes Made

  1. WebClientConfigurator.java:

    • Added public static method createDefaultObjectMapper() to expose the default ObjectMapper configuration
    • Added new method configureObjectMapperWithMediaTypes() that accepts additional MediaType parameters for the Jackson decoder
    • Uses Stream.concat API for combining media types arrays (cleaner than manual array manipulation)
    • This allows the WebClient to accept vendor-specific content types while still supporting standard application/json
  2. KafkaClusterFactory.java:

    • Added constants for Schema Registry content types: application/vnd.schemaregistry.v1+json and application/vnd.schemaregistry+json
    • Updated schemaRegistryClient() method to use the new configureObjectMapperWithMediaTypes() method
    • Added documentation explaining the compatibility fix for Confluent Schema Registry and compatible implementations like WarpStream
  3. WebClientConfiguratorTest.java (new):

    • Added unit tests to verify the new configureObjectMapperWithMediaTypes() method works correctly
    • Tests cover single media type, multiple media types, and no additional media types scenarios

Security Review

  • Code review completed: No issues found
  • Manual security review: No security vulnerabilities introduced
    • Changes only extend the list of accepted content types for Schema Registry responses
    • No changes to authentication, authorization, or data handling logic

Testing Notes

  • Unit tests added to verify the configuration works correctly
  • The fix is backward compatible - existing functionality is preserved
  • Standard application/json content type is still supported alongside the new Schema Registry-specific types
Original prompt

This section details on the original issue you should resolve

<issue_title>Warpstream Schema Registry Compatability</issue_title>
<issue_description>### Issue submitter TODO list

  • I've searched for an already existing issues here
  • I'm running a supported version of the application which is listed here and the feature is not present there

Is your proposal related to a problem?

Hi everybody,
this is my first issue so please be kind :). Im not sure whether this is a bug or a feature request, but to me this feels more like extending the compatiblity of Kafka UI rather than fixing a bug.

As for my request:
When using Kafka UI with WarpStream’s Schema Registry, the Schema Registry tab fails to load consistently.

Kafka UI throws an exception indicating that the response content type returned by the Schema Registry is not supported, even though WarpStream documentation states that the Schema Registry is Confluent protocol compatible.

https://docs.warpstream.com/warpstream/schema-registry/warpstream-byoc-schema-registry#protocol-support

The Kafka UI log shows:

org.springframework.web.reactive.function.client.WebClientResponseException: 
200 OK from GET http://localhost:9094/config, but response failed with cause: 
org.springframework.web.reactive.function.UnsupportedMediaTypeException: 
Content type 'application/vnd.schemaregistry.v1+json' not supported for 
bodyType=io.kafbat.ui.sr.model.CompatibilityConfig

Describe the feature you're interested in

Kafka UI should successfully parse and display the Schema Registry configuration and schemas when using a Confluent-compatible Schema Registry implementation.

Describe alternatives you've considered

No response

Version you're running

dfa5a7e

Additional context

No response</issue_description>

<agent_instructions>probly needs acceptable content type tuned, looks documented in confluent docs but somehow doesn't happen with confluent SR itself</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@Haarolean probly needs acceptable content type tuned, looks documented in confluent docs but somehow doesn't happen with confluent SR itself

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Jan 19, 2026
Copilot AI and others added 2 commits January 19, 2026 20:39
Co-authored-by: Haarolean <1494347+Haarolean@users.noreply.github.com>
Co-authored-by: Haarolean <1494347+Haarolean@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Schema Registry compatibility for Warpstream Support Schema Registry vendor-specific content types (application/vnd.schemaregistry.v1+json) Jan 19, 2026
Copilot AI requested a review from Haarolean January 19, 2026 20:44

// Configure decoder to accept APPLICATION_JSON and additional media types
MediaType[] allMediaTypes = new MediaType[additionalMediaTypes.length + 1];
allMediaTypes[0] = MediaType.APPLICATION_JSON;
Copy link
Member

Choose a reason for hiding this comment

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

@copilot aren't there built-in APIs for this?

Copy link
Author

Choose a reason for hiding this comment

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

Good catch! Replaced the manual array manipulation with Stream.concat() in commit d7b62e2. This is cleaner and more idiomatic.

@Haarolean Haarolean marked this pull request as ready for review February 12, 2026 08:01
@Haarolean Haarolean requested a review from a team as a code owner February 12, 2026 08:01
… types

Co-authored-by: Haarolean <1494347+Haarolean@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/triage/completed Automatic triage completed status/triage/manual Manual triage in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warpstream Schema Registry Compatability

2 participants