Skip to content

Catch up to latest spec versions from docs/api branch #18

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

Merged
merged 1 commit into from
Aug 19, 2025

Conversation

kbatuigas
Copy link
Contributor

This PR ensures that this repo has the latest version of the API spec files from https://github.com/redpanda-data/docs/tree/api/modules/ROOT/attachments (Cloud APIs are handled by GH automation).

@kbatuigas kbatuigas requested a review from a team as a code owner August 18, 2025 21:32
Copy link

coderabbitai bot commented Aug 18, 2025

📝 Walkthrough

Walkthrough

The schema-registry OpenAPI JSON updates from v1.0.6 to v1.1.0 and changes host to localhost:8081. A new /security/acls path is added with GET/POST/DELETE using a new security_acl definition. The subject_schema definition is renamed to stored_schema with all $ref updates. A new string query parameter format is added to several schema retrieval endpoints with 501 responses for unsupported values. The deleted query parameter type changes from string to boolean on multiple subject/version endpoints. Minor error description text is updated.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant Registry API

  Note over Client,Registry API: ACL Management (/security/acls)

  Client->>Registry API: GET /security/acls?principal=&resource=&...
  Registry API-->>Client: 200 [security_acl[]] | 401/403/500

  Client->>Registry API: POST /security/acls { acls: security_acl[] }
  Registry API-->>Client: 201 | 400/401/403/500

  Client->>Registry API: DELETE /security/acls { acls: security_acl[] }
  Registry API-->>Client: 200 [security_acl[]] | 400/401/403/500
Loading
sequenceDiagram
  participant Client
  participant Registry API

  Note over Client,Registry API: Schema retrieval with format parameter

  Client->>Registry API: GET /schemas/ids/{id}?format={value}
  alt supported format
    Registry API-->>Client: 200 stored_schema
  else unsupported format
    Registry API-->>Client: 501 Not Implemented
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch latest-sm-api-specs

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

🚨 Breaking API change detected:

Added (3)

  • DELETE /security/acls
  • GET /security/acls
  • POST /security/acls

Modified (6)

  • GET /schemas/ids/{id}
    • Query parameter added: format
    • Response added: 501
  • GET /subjects
    • [Breaking] Query parameter modified: deleted
      • Type went from string to boolean [Breaking]
  • GET /subjects/{subject}/versions
    • [Breaking] Query parameter modified: deleted
      • Type went from string to boolean [Breaking]
  • GET /subjects/{subject}/versions/{version}
    • [Breaking] Query parameter modified: deleted
      • Type went from string to boolean [Breaking]
    • Query parameter added: format
    • Response added: 501
  • GET /subjects/{subject}/versions/{version}/schema
    • [Breaking] Query parameter modified: deleted
      • Type went from string to boolean [Breaking]
    • Query parameter added: format
    • Response added: 501
  • POST /subjects/{subject}
    • Query parameter added: format
    • Response added: 501

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 (10)
schema-registry/schema-registry.json (10)

556-560: Booleanize deleted parameter: add an explicit default

Consider documenting the default to reduce ambiguity in generated clients and docs.

Apply this diff:

           {
             "name": "deleted",
             "in": "query",
             "required": false,
-            "type": "boolean"
+            "type": "boolean",
+            "default": false
           }

598-602: Booleanize deleted parameter: add an explicit default

Same suggestion for /subjects.

           {
             "name": "deleted",
             "in": "query",
             "required": false,
-            "type": "boolean"
+            "type": "boolean",
+            "default": false
           }

780-784: Booleanize deleted parameter: add an explicit default

Same suggestion for /subjects/{subject}/versions.

           {
             "name": "deleted",
             "in": "query",
             "required": false,
-            "type": "boolean"
+            "type": "boolean",
+            "default": false
           }

900-904: Booleanize deleted parameter: add an explicit default

Same suggestion for GET /subjects/{subject}/versions/{version}.

           {
             "name": "deleted",
             "in": "query",
             "required": false,
-            "type": "boolean"
+            "type": "boolean",
+            "default": false
           }

1026-1030: Booleanize deleted parameter: add an explicit default

Same suggestion for GET raw schema.

           {
             "name": "deleted",
             "in": "query",
             "required": false,
-            "type": "boolean"
+            "type": "boolean",
+            "default": false
           }

446-451: Constrain format values with enum + default (helps client SDKs and docs)

Defining allowed values improves codegen and prevents invalid inputs. You can still document Protobuf-only semantics in the description.

Note: Some code generators struggle with empty string enums; if that’s a concern, we can alternatively omit enum for "" and only enumerate "serialized". As-is, adding both works with most tools.

           {
             "name": "format",
             "in": "query",
             "required": false,
-            "type": "string",
-            "description": "Redpanda version 25.2 or later. For Avro and Protobuf schemas only. Supported values: an empty string `''` returns the schema in its current format (default), and `serialized` (Protobuf only) returns the schema in its Base64-encoded wire binary format. Unsupported values return a 501 error."
+            "type": "string",
+            "enum": ["", "serialized"],
+            "default": "",
+            "description": "Redpanda version 25.2 or later. Avro/Protobuf only. Supported values: empty string `''` (default) returns the schema in its current format; `serialized` (Protobuf only) returns the Base64-encoded wire binary format. Other values return 501."
           }

663-668: Apply the same enum/default to format on POST /subjects/{subject}

Keep the parameter contract consistent across endpoints.

           {
             "name": "format",
             "in": "query",
             "required": false,
-            "type": "string",
-            "description": "Redpanda version 25.2 or later. For Avro and Protobuf schemas only. Supported values: an empty string `''` returns the schema in its current format (default), and `serialized` (Protobuf only) returns the schema in its Base64-encoded wire binary format. Unsupported values return a 501 error."
+            "type": "string",
+            "enum": ["", "serialized"],
+            "default": "",
+            "description": "Redpanda version 25.2 or later. Avro/Protobuf only. Supported values: empty string `''` (default) returns the schema in its current format; `serialized` (Protobuf only) returns the Base64-encoded wire binary format. Other values return 501."
           },

906-911: Apply the same enum/default to format on GET subject version

Aligns with other endpoints.

           {
             "name": "format",
             "in": "query",
             "required": false,
-            "type": "string",
-            "description": "Redpanda version 25.2 or later. For Avro and Protobuf schemas only. Supported values: an empty string `''` returns the schema in its current format (default), and `serialized` (Protobuf only) returns the schema in its Base64-encoded wire binary format. Unsupported values return a 501 error."
+            "type": "string",
+            "enum": ["", "serialized"],
+            "default": "",
+            "description": "Redpanda version 25.2 or later. Avro/Protobuf only. Supported values: empty string `''` (default) returns the schema in its current format; `serialized` (Protobuf only) returns the Base64-encoded wire binary format. Other values return 501."
           }

1032-1036: Apply the same enum/default to format on GET raw schema

Aligns with other endpoints.

           {
             "name": "format",
             "in": "query",
             "required": false,
-            "type": "string",
-            "description": "Redpanda version 25.2 or later. For Avro and Protobuf schemas only. Supported values: an empty string `''` returns the schema in its current format (default), and `serialized` (Protobuf only) returns the schema in its Base64-encoded wire binary format. Unsupported values return a 501 error."
+            "type": "string",
+            "enum": ["", "serialized"],
+            "default": "",
+            "description": "Redpanda version 25.2 or later. Avro/Protobuf only. Supported values: empty string `''` (default) returns the schema in its current format; `serialized` (Protobuf only) returns the Base64-encoded wire binary format. Other values return 501."
           }

1271-1479: New /security/acls API surface looks coherent; consider tagging operations for grouping

The GET/POST/DELETE shapes, enums, examples, and error responses look good. To improve UI grouping and client discoverability, add a “Security” tag to these operations.

       "get": {
+        "tags": ["Security"],
         "summary": "List ACLs",
         "description": "Returns a list of ACL rules that match the specified filters.",
         "operationId": "get_security_acls",
       "post": {
+        "tags": ["Security"],
         "summary": "Create ACLs",
         "description": "Create new ACL rules.",
         "operationId": "post_security_acls",
       "delete": {
+        "tags": ["Security"],
         "summary": "Delete ACLs",
         "description": "Delete ACL rules that match the specified definitions exactly.",
         "operationId": "delete_security_acls",
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear 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 c250d8b and c242a45.

📒 Files selected for processing (1)
  • schema-registry/schema-registry.json (36 hunks)
🔇 Additional comments (8)
schema-registry/schema-registry.json (8)

5-8: Version and host bump look good

Spec version bumped to 1.1.0 and host updated to localhost:8081. No concerns.


44-45: Consistent capitalization in error descriptions

“Internal Server Error” capitalization and “Not Found: …” messages are now consistent across endpoints. Good cleanup.

Also applies to: 87-88, 124-125, 150-151, 187-188, 213-214, 256-257, 303-304, 359-360, 397-398, 426-427, 480-487, 536-537, 584-585


686-687: Ref updated to stored_schema

The response schema now references stored_schema. Rename is applied correctly here.


921-923: Ref update to stored_schema on GET subject version

The entity rename is correctly reflected in this response too.


1009-1012: Improved summary/description for raw schema

The wording clarifies output format without escaping. Reads better and matches behavior.


1521-1557: stored_schema definition is well-structured

Fields align with responses and existing schema_def shape. Looks good.


1600-1662: security_acl definition is comprehensive and consistent with query enums

The required list and enums reflect the API surface accurately.


1-1664: Validation Checks Passed: JSON parses, no stray subject_schema refs, and all format endpoints include 501 responses

All automated verifications succeeded:

  • schema-registry.json is valid JSON.
  • No leftover #/definitions/subject_schema references.
  • Every operation that defines a format query parameter declares a 501 response.

No further changes required.

Copy link
Contributor

@micheleRP micheleRP left a comment

Choose a reason for hiding this comment

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

lgtm

@kbatuigas kbatuigas merged commit f1ddc7f into main Aug 19, 2025
4 checks passed
@kbatuigas kbatuigas deleted the latest-sm-api-specs branch August 19, 2025 01:08
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