-
Notifications
You must be signed in to change notification settings - Fork 2
Schema-Registry: Update for v25.2.2 #22
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
Conversation
Signed-off-by: Ben Pope <[email protected]>
📝 WalkthroughWalkthroughThe OpenAPI schema for schema-registry.json was updated to adjust response and parameter references and enrich compatibility definitions. GET /schemas/ids/{id} now returns a payload via $ref to definitions/schema_def instead of an inline object. A body parameter named schema_def now references definitions/stored_schema rather than definitions/schema_def. Definitions for get_compatibility.compatibilityLevel and put_compatibility.compatibility were expanded to include description, example, and an enum of allowed string values. Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant API as Schema Registry API
participant Def as Schema Definitions
Note over API,Def: GET /schemas/ids/{id}
C->>API: GET /schemas/ids/{id}
API->>Def: Resolve $ref: definitions/schema_def
Def-->>API: schema_def structure
API-->>C: 200 body: schema_def (via $ref)
Note over API: Response no longer inline {schemaType, schema}
sequenceDiagram
autonumber
participant C as Client
participant API as Schema Registry API
participant Def as Schema Definitions
rect rgba(230, 245, 255, 0.4)
Note over API,Def: Submit schema using body param "schema_def"
C->>API: POST/PUT ... body: stored_schema
API->>Def: Validate against definitions/stored_schema
Def-->>API: Validation result
API-->>C: Success or error
end
sequenceDiagram
autonumber
participant C as Client
participant API as Schema Registry API
participant Def as Schema Definitions
Note over API,Def: Compatibility configuration
C->>API: GET /config
API->>Def: Resolve get_compatibility.compatibilityLevel (enum, example, desc)
API-->>C: 200 body with compatibilityLevel
C->>API: PUT /config { compatibility }
API->>Def: Validate compatibility against enum
API-->>C: 200 on valid • 4xx on invalid
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🤖 API structural change detected: Modified (2)
|
There was a problem hiding this 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)
829-833: Intentional use of stored_schema here looks correct; add a brief param description to avoid confusion.Matches prior maintainer guidance that this endpoint accepts stored_schema rather than schema_def. Consider clarifying with a short description on the body parameter.
Apply:
{ "name": "schema_def", "in": "body", + "description": "Request body uses stored_schema (includes subject, version, id, schemaType, references, schema).", "schema": { - "$ref": "#/definitions/stored_schema" + "$ref": "#/definitions/stored_schema" } }
1223-1226: Typo in definition name is_compatibile (one “l”) — consider correcting with an alias to avoid breaking $refs.If you want to fix it now, add a new correctly spelled definition and point $refs to it; retain the old one as a temporary alias to avoid churn.
Apply:
- "is_compatibile": { + "is_compatible": { "type": "object", "properties": { "is_compatible": { "type": "boolean" }, "messages": { "type": "array", "items": { "type": "string" } } } }, + "is_compatibile": { "$ref": "#/definitions/is_compatible" },And update the $ref at the response:
- "$ref": "#/definitions/is_compatibile" + "$ref": "#/definitions/is_compatible"Also applies to: 1584-1597
📜 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.
📒 Files selected for processing (1)
schema-registry/schema-registry.json(3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: BenPope
PR: redpanda-data/api-docs#19
File: schema-registry/schema-registry.json:829-833
Timestamp: 2025-08-22T15:23:48.814Z
Learning: In the Redpanda Schema Registry API (schema-registry/schema-registry.json), the POST /subjects/{subject}/versions endpoint intentionally uses stored_schema (which includes id, subject, version fields) as the request body schema reference instead of schema_def, as confirmed by the API maintainer BenPope.
📚 Learning: 2025-08-22T15:23:48.814Z
Learnt from: BenPope
PR: redpanda-data/api-docs#19
File: schema-registry/schema-registry.json:829-833
Timestamp: 2025-08-22T15:23:48.814Z
Learning: In the Redpanda Schema Registry API (schema-registry/schema-registry.json), the POST /subjects/{subject}/versions endpoint intentionally uses stored_schema (which includes id, subject, version fields) as the request body schema reference instead of schema_def, as confirmed by the API maintainer BenPope.
Applied to files:
schema-registry/schema-registry.json
🔇 Additional comments (3)
schema-registry/schema-registry.json (3)
1554-1558: Enums/examples for get_compatibility are a nice improvement.Clearer contract for clients; no issues spotted.
1565-1569: Enums/examples for put_compatibility look good.Keeps request/response symmetry and improves client validation.
459-464: Approve — GET /schemas/ids/{id} uses reusable schema_def; $refs verified OK.
#19 but on this Repo