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

[SDK] Generate Enum Types for Katib APIs #1969

Open
andreyvelich opened this issue Oct 4, 2022 · 4 comments
Open

[SDK] Generate Enum Types for Katib APIs #1969

andreyvelich opened this issue Oct 4, 2022 · 4 comments

Comments

@andreyvelich
Copy link
Member

/kind feature

Check this thread: #1951 (comment).
Currently, we don't generate enum types in Python models for Katib APIs (e.g. minimize and maximize).
For that, we might need to update kube-openapi version.


Love this feature? Give it a 👍 We prioritize the features with the most 👍

@andreyvelich
Copy link
Member Author

/area sdk

@tenzen-y
Copy link
Member

tenzen-y commented Jan 7, 2023

@andreyvelich Enum generator of kube-openapi enables by default since v1.24.
So I could automatically generate swagger.json with the Enum type:

...
        "type": {
          "description": "Type for Experiment optimization.\n\nPossible enum values:\n - `\"\"`\n - `\"maximize\"`\n - `\"minimize\"`",
          "type": "string",
          "enum": [
            "",
            "maximize",
            "minimize"
          ]
        }
...

Although, I could not automatically generate Python Modules with Enum Classes. And then openapi_types was generated the same as now.

We can not resolve this issue by upgrading kube-openapi, probably.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@andreyvelich
Copy link
Member Author

/lifecycle frozen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants