digitalocean / digitalocean/doctl
Some inconsistencies in enum argument descriptions
- Dominant language
- Go
- Stars
- 3.4k
- Forks
- 496
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
**Describe the Issue:**
I have done some more investigation related to this PR: https://github.com/digitalocean/doctl/pull/1595, and I found more related issues / inconsistencies.
For instance in **doctl databases topics update**:
```
--cleanup-policy string Specifies the retention policy to use on log segments: Possible values are 'delete', 'compact_delete', 'compact' (default "delete")
--compression-type string Specifies the compression type for a kafka topic: Possible values are 'producer', 'gzip', 'snappy', 'Iz4', 'zstd', 'uncompressed' (default "producer")
```
but in **doctl databases create** and most other places:
```
--engine pg The database's engine. Possible values are: pg, `mysql`, `redis`, `mongodb`, `kafka` and `opensearch`. (default "pg")
```
In the first example, apostrophes don't interfere with command argument type generation and it stays defined as **string**.
In the second example, backticks are causing to use first value (**pg**) as data type for argument, which can be confusing.
I would be happy to create PR to fix this, however, I am not sure whether there's any reason attached to using backticks versus apostrophes. I am also not sure why default value is in quotes.
One possible solution is to introduce **enum** data type, and then argument descriptions could look like this:
```
--engine enum The database's engine. Possible enum values are: `pg`, `mysql`, `redis`, `mongodb`, `kafka` and `opensearch`. (default "pg")
```
Contributor guide
Assessment
This issue has not been assessed yet.