-
Notifications
You must be signed in to change notification settings - Fork 141
Diagnostic API: Update OpenAPI Specs #7955
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
Redocly previews |
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.
Pull request overview
This PR updates the OpenAPI specifications for the Diagnostic API's dry-run endpoints (Sync Function and Import Filter) to align with the desired implementation and improve documentation clarity.
Changes:
- Converted both endpoints from
GETtoPOSTand moveddoc_idfrom query parameter to request body - Added new request properties (
meta,userCtx) to Sync Function API for upcoming user xattrs support and user/channel/role impersonation - Added
expiryresponse property to Sync Function API to document current implementation - Simplified
docschema definition and improved documentation with clearer behavior tables - Introduced shared schemas for common diagnostic API response fields (
DiagnosticFunctionException,DiagnosticFunctionLogging)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/api/paths/diagnostic/keyspace-sync.yaml | Updated Sync Function dry-run API endpoint: changed HTTP method to POST, moved doc_id to request body, added meta and userCtx request properties, added expiry response property, improved documentation with clearer behavior table and examples |
| docs/api/paths/diagnostic/keyspace-import_filter.yaml | Updated Import Filter dry-run API endpoint: changed HTTP method to POST, moved doc_id to request body, added behavior table similar to Sync Function API, simplified doc schema, switched to shared schema references for exception and logging fields |
| docs/api/components/schemas.yaml | Added two new shared schemas (DiagnosticFunctionException and DiagnosticFunctionLogging) for common diagnostic API response fields |
| properties: | ||
| additionalProperties: | ||
| x-additionalPropertiesName: user_xattr_key | ||
| description: The user XATTR JSON value. The property name must exactly match the configured `user_xattr_key`. The value can be any valid JSON type (Object, String, Number, etc.) | ||
| oneOf: | ||
| - type: object | ||
| additionalProperties: true | ||
| example: | ||
| foo: bar | ||
| description: An object value to be used as the user XATTR. | ||
| - type: string | ||
| example: foo | ||
| description: A string value to be used as the user XATTR. | ||
| - type: integer | ||
| example: 100 | ||
| description: A number value to be used as the user XATTR. | ||
| - type: boolean | ||
| example: true | ||
| description: A boolean value to be used as the user XATTR. | ||
| - type: array | ||
| items: | ||
| example: | ||
| - foo | ||
| - bar | ||
| description: An array of values to be used as the user XATTR. |
Copilot
AI
Jan 14, 2026
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.
The additionalProperties keyword should not be nested under properties. It should be a sibling to properties at the same level. Move additionalProperties out of the properties block and place it as a direct child of the xattrs object schema.
| properties: | |
| additionalProperties: | |
| x-additionalPropertiesName: user_xattr_key | |
| description: The user XATTR JSON value. The property name must exactly match the configured `user_xattr_key`. The value can be any valid JSON type (Object, String, Number, etc.) | |
| oneOf: | |
| - type: object | |
| additionalProperties: true | |
| example: | |
| foo: bar | |
| description: An object value to be used as the user XATTR. | |
| - type: string | |
| example: foo | |
| description: A string value to be used as the user XATTR. | |
| - type: integer | |
| example: 100 | |
| description: A number value to be used as the user XATTR. | |
| - type: boolean | |
| example: true | |
| description: A boolean value to be used as the user XATTR. | |
| - type: array | |
| items: | |
| example: | |
| - foo | |
| - bar | |
| description: An array of values to be used as the user XATTR. | |
| additionalProperties: | |
| x-additionalPropertiesName: user_xattr_key | |
| description: The user XATTR JSON value. The property name must exactly match the configured `user_xattr_key`. The value can be any valid JSON type (Object, String, Number, etc.) | |
| oneOf: | |
| - type: object | |
| additionalProperties: true | |
| example: | |
| foo: bar | |
| description: An object value to be used as the user XATTR. | |
| - type: string | |
| example: foo | |
| description: A string value to be used as the user XATTR. | |
| - type: integer | |
| example: 100 | |
| description: A number value to be used as the user XATTR. | |
| - type: boolean | |
| example: true | |
| description: A boolean value to be used as the user XATTR. | |
| - type: array | |
| items: | |
| example: | |
| - foo | |
| - bar | |
| description: An array of values to be used as the user XATTR. |
| example: | ||
| - foo | ||
| - bar | ||
| description: An array of values to be used as the user XATTR. | ||
|
|
Copilot
AI
Jan 14, 2026
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.
The example field for array items should be a single value, not an array. The outer items already indicates this is describing individual array elements. Change the example to a single value like "foo" instead of ["foo", "bar"].
| example: | |
| - foo | |
| - bar | |
| description: An array of values to be used as the user XATTR. | |
| example: foo | |
| description: An array of values to be used as the user XATTR. |
| | `doc` property | `doc_id` property | Behaviour | | ||
| | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | Set | Unset | The document body passed will be the `doc` value in the sync function, and `oldDoc` will be empty. | | ||
| | Unset | Set | The document of the given id will be fetched from the bucket/collection and will be passed in as the `doc` value in the sync function. If the document is not found, an error will be returned | | ||
| | Set | Set | The document body passed will be the `doc` value in the sync function, and the `doc_id` will be fetched from the bucket/collection and will be the `oldDoc` value. If `doc_id` doesn't exist, then `oldDoc` will be empty | | ||
| | Unset | Unset | Will throw an error (at least one of `doc` or `doc_id` is required) | |
Copilot
AI
Jan 14, 2026
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.
The table header alignment is inconsistent. The separator row shows different column widths (----- vs --------) than the actual content requires. Adjust the separator to match the column widths consistently.
RIT3shSapata
left a comment
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.
LGTM
Updates to Diagnostic API OpenAPI Specs to align with desired implementation and cleanup.
doc/doc_idtable to description similar to Sync Function APImetarequest property for upcoming user xattrs supportuserCtxrequest property for upcoming user/channel/role impersonation supportexpiryresponse property to document current implementationdocschema to make it obvious it's a user-defined doc body, no metadata required.GETtoPOSTand movedoc_idquery param to request body paramIntegration Tests