Skip to content
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

Some inconsistencies in enum argument descriptions #1597

Open
zikalino opened this issue Oct 19, 2024 · 0 comments
Open

Some inconsistencies in enum argument descriptions #1597

zikalino opened this issue Oct 19, 2024 · 0 comments
Labels

Comments

@zikalino
Copy link
Contributor

Describe the Issue:

I have done some more investigation related to this PR: #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")
@zikalino zikalino added the bug label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant