Skip to content

Conversation

kbatuigas
Copy link
Contributor

This pull request updates the Schema Registry API specification to support a new mode and adds an option to override checks when setting modes. The changes primarily affect the schema-registry/schema-registry.json file and introduce a new IMPORT mode, as well as a force query parameter for relevant endpoints.

API feature additions:

  • Added support for a new IMPORT mode to the mode definition, expanding the possible values for schema registry operation modes.

  • Introduced a new optional force query parameter to the global mode-setting endpoint, allowing clients to override the emptiness check when setting the global mode to IMPORT.

  • Added the same optional force query parameter to the subject mode-setting endpoint, enabling override of the emptiness check for individual subjects when switching to IMPORT mode.

Version update:

  • Bumped the API version from 1.1.0 to 1.1.1 to reflect these changes.

@kbatuigas kbatuigas requested a review from a team as a code owner October 16, 2025 04:31
@coderabbitai
Copy link

coderabbitai bot commented Oct 16, 2025

📝 Walkthrough

Walkthrough

  • schema-registry.json: API version updated from 1.1.0 to 1.1.1.
  • PUT /mode: Adds optional boolean query parameter force.
  • PUT /mode/{subject}: Adds optional boolean query parameter force.
  • definitions.mode enum extended with value "IMPORT" in addition to existing values (e.g., "READONLY").

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Client
    participant API as Schema Registry API

    rect rgba(200,230,255,0.3)
    note over Client,API: PUT /mode (global) — NEW: optional force, NEW enum value IMPORT
    Client->>API: PUT /mode?mode=IMPORT&force=true?
    alt force=true (optional)
        API->>API: Apply mode with force override
    else force not provided/false
        API->>API: Apply mode with standard checks
    end
    API-->>Client: 200 OK / error
    end
Loading
sequenceDiagram
    autonumber
    actor Client
    participant API as Schema Registry API

    rect rgba(200,255,200,0.3)
    note over Client,API: PUT /mode/{subject} — NEW: optional force, NEW enum value IMPORT
    Client->>API: PUT /mode/{subject}?mode=IMPORT&force=true?
    alt force=true (optional)
        API->>API: Apply subject mode with force override
    else force not provided/false
        API->>API: Apply subject mode with standard checks
    end
    API-->>Client: 200 OK / error
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The title “Add Schema Registry import mode” succinctly and accurately summarizes the primary change of introducing the new IMPORT mode in the schema registry API specification while remaining concise and clear. It reflects the main enhancement without unnecessary detail or unrelated noise.
Linked Issues Check ✅ Passed The pull request addresses the objectives of DOC-1194 by documenting the new IMPORT mode and including the optional force override parameters in the API spec, fulfilling the issue’s requirement for updated documentation. All coding-related requirements from the linked issue are implemented as described.
Out of Scope Changes Check ✅ Passed All modifications in this pull request are confined to schema-registry.json and directly relate to adding the IMPORT mode, the force parameter, and the version bump as specified in the linked issue, with no unrelated or extraneous changes introduced.
Description Check ✅ Passed The description clearly describes the addition of the IMPORT mode, the new force query parameters for both global and subject endpoints, and the version bump, all of which align directly with the changes in the schema-registry.json file. It is fully topical and matches the actual modifications introduced.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch DOC-1194-api-sr-import-mode

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

🤖 API structural change detected:

Modified (2)

  • PUT /mode
    • Query parameter added: force
  • PUT /mode/{subject}
    • Query parameter added: force

Preview documentation

Powered by Bump.sh

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
schema-registry/schema-registry.json (2)

229-242: Document default false for force.

Swagger/OpenAPI consumers will benefit from the explicit default. Adding "default": false makes it clear that omitting the flag preserves the existing emptiness check.

           "required": false,
-          "type": "boolean"
+          "type": "boolean",
+          "default": false

333-346: Mirror the force default on subject-level mode updates.

Same reasoning as the global mode endpoint—stating "default": false keeps the documentation unambiguous for generated clients and readers.

           "required": false,
-          "type": "boolean"
+          "type": "boolean",
+          "default": false
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7309c88 and 12dbde3.

📒 Files selected for processing (1)
  • schema-registry/schema-registry.json (4 hunks)

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.

2 participants