chore: remove datasets API and related job types#66
Conversation
| pub mod connections_api; | ||
| pub mod database_context_api; | ||
| pub mod databases_api; | ||
| pub mod datasets_api; |
There was a problem hiding this comment.
Blocking — build break. Removing the datasets_api module (and the dataset models / dataset-index ops) leaves the hand-written wrapper layer dangling. These files are not regenerated by the OpenAPI generator and still reference the deleted symbols, so the crate will fail to compile:
src/resources.rs—DatasetsApi(lines 20–84) callsapis::datasets_api::{create_dataset, get_dataset, list_datasets, update_dataset, delete_dataset, list_dataset_versions}and usesmodels::{CreateDatasetRequest, CreateDatasetResponse, GetDatasetResponse, ListDatasetsResponse, UpdateDatasetRequest, UpdateDatasetResponse, ListDatasetVersionsResponse}— all deleted (E0433/E0412).src/resources.rs:426–449—create_dataset_index/list_dataset_indexes/delete_dataset_indexcallapis::indexes_api::{create_dataset_index, list_dataset_indexes, delete_dataset_index}and their*Errorenums, all removed fromindexes_api.rsin this PR.src/resources.rs:867–890— unit tests constructDatasetsApi::new(&config).src/client.rs:726–727—pub fn datasets(&self) -> crate::resources::DatasetsApi<'_>.src/lib.rs:52— re-exportsDatasetsApi.
The hand-written wrapper/re-export layer must be updated in the same change to drop these dataset entry points (and src/field.rs doc references to UpdateDatasetRequest).
There was a problem hiding this comment.
Review
Blocking Issues
This auto-generated OpenAPI update deletes the entire datasets_api module, all dataset models, and the dataset-index operations from indexes_api.rs, but the hand-written wrapper/re-export layer is not regenerated and still references the deleted symbols. The crate will not compile.
src/resources.rs:20-84—DatasetsApiwrapper callsapis::datasets_api::{create_dataset, get_dataset, list_datasets, update_dataset, delete_dataset, list_dataset_versions}and referencesmodels::{CreateDatasetRequest, CreateDatasetResponse, GetDatasetResponse, ListDatasetsResponse, UpdateDatasetRequest, UpdateDatasetResponse, ListDatasetVersionsResponse}— all deleted by this PR (unresolved module / type errors).src/resources.rs:426-449—create_dataset_index/list_dataset_indexes/delete_dataset_indexcallapis::indexes_api::{create_dataset_index, list_dataset_indexes, delete_dataset_index}and theirCreateDatasetIndexError/ListDatasetIndexesError/DeleteDatasetIndexErrorenums, all removed fromindexes_api.rshere.src/resources.rs:867-890— unit tests instantiateDatasetsApi::new(&config).src/client.rs:726-727—pub fn datasets(&self)returnscrate::resources::DatasetsApi<'_>.src/lib.rs:52— re-exportsDatasetsApi.src/field.rs:4,21,23— doc examples reference the deletedmodels::UpdateDatasetRequest.
Action Required
Update the hand-written wrapper layer in the same change so it no longer depends on the removed generated code:
- Remove the
DatasetsApiresource handle and its tests fromsrc/resources.rs, plus the dataset-index methods (create_dataset_index,list_dataset_indexes,delete_dataset_index). - Remove
Client::datasets()fromsrc/client.rsand theDatasetsApire-export fromsrc/lib.rs. - Fix the
src/field.rsdoc example to use a model that still exists. - Confirm
cargo buildandcargo testpass before merge.
There was a problem hiding this comment.
Cycle 1 blocking issue (dangling dataset references in the hand-written wrapper layer) is resolved — src/resources.rs, src/client.rs, src/lib.rs, and src/field.rs were updated to drop all dataset entry points, and no references to deleted symbols remain in src/, tests/, or examples/.
Auto-generated from the updated HotData OpenAPI spec.
Source: https://github.com/hotdata-dev/www.hotdata.dev/pull/233