aiven-client icon indicating copy to clipboard operation
aiven-client copied to clipboard

Kafka topic function arguments not aligned with API Spec

Open steppi91 opened this issue 2 years ago • 0 comments

What happened?

Using the AivenClient functions for kafka topic handling (creation and updating) I expected a similar interface as in the HTTP API documentation (https://api.aiven.io/doc/#operation/ServiceKafkaTopicCreate, https://api.aiven.io/doc/#operation/ServiceKafkaTopicUpdate)

But the function arguments of AivenClient.create_service_topic and AivenClient.update_service_topic are very different:

Not all config parameters are exposed, and the exposed ones are deprecated since they should be in a config dict (namely min_insync_replicas, retention_bytes, retention_hours, cleanup_policy)

Also most of the parameters are mandatory, while the API lists any but topic_name as optional

What did you expect to happen?

Having the function signature in sync with the backing API, since they are basically only passed as a body to a generic client

What else do we need to know?

Versions: aiven-client 2.15.0 API version v1

steppi91 avatar Jun 09 '22 15:06 steppi91