-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Use snake case for saved objects import/export API #54123
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
We decided that, since this is a frequently used API, we will defer making the actual breaking change in 8.0, and instead address the other items in the scope (introducing new snake case fields, marking camelCase ones as deprecated). Actual removal of the deprecated fields will be treated as a follow-up task, and timing for that is TBD. |
I have a draft PR in progress for this and, unsurprisingly, the scope keeps growing:
|
Yes, if you decide to go down this route, we should update the CTS routes accordingly 👍 |
Based on our team discussion today, we will go ahead and hold on making these changes pending the outcome of our discussions around handling multi-space support in SO import/export, as explained in #91615 (comment) As there is a likelihood we will opt to create new import/export APIs and eventually deprecate and remove the existing ones, it wouldn't really make sense to invest the time to deprecate & change these field names if the whole API could end up being deprecated in the future. I'll go ahead and mark this as |
Closing as the cost for ourselves and customers to adopt the snake case params would just not be worth the small benefit that consistency brings. |
As per #52284 (comment) we should stick to the convention for snake case API's. Therefore, before marking the import/export API as "stable" we should fix the following camel case fields:
Import API changes
createNewCopies
tocreate_new_copies
successCount
tosuccess_count
successResults
tosuccess_results
successResults[]
array are also not snake_case:SavedObjectsImportSuccess.destinationId
todestination_id
SavedObjectsImportSuccess.createNewCopy
tocreate_new_copy
errors
array need updating as well:SavedObjectsImportActionRequiredWarning.actionPath
toaction_path
SavedObjectsImportActionRequiredWarning.buttonLabel
tobutton_label
SavedObjectsImportConflictError.destinationId
todestination_id
SavedObjectsImportUnknownError.statusCode
tostatus_code
SavedObjectsImportAmbiguousConflictError.destinations.updatedAt
toupdated_at
Export API changes
hasReference
tohas_reference
includeReferencesDeep
toinclude_references_deep
excludeExportDetails
toexclude_export_details
We should not be making any changes to the actual file format of the
ndjson
file.Related APIs that should also change as they contain some of the same fields listed above:
_resolve_import_errors
_copy_saved_objects
Implementation Scope
This should probably be done in a multi-phased approach:
The text was updated successfully, but these errors were encountered: