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

bugfix: emit enum in schema when used as list or map element #454

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

alexzielenski
Copy link
Contributor

fixes #450

Doing this I feel like we are getting closer to need a refactor since when we add a feature there is so much conditional code we end up missing spots. But I am wondering how tolerant we are of possibly changing the generated schema?

/assign @Jefftree

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 23, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexzielenski

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from jpbetz and sttts February 23, 2024 20:41
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 23, 2024
@Jefftree
Copy link
Member

/lgtm
/hold (in case you want more eyes)

What kind of changes were you thinking? Emitting additional validation information in the OpenAPI seems like a net positive to me.

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Feb 23, 2024
@alexzielenski
Copy link
Contributor Author

/hold cancel

I meant that the code generator feels like it could use a refactor. It is very painful to add/maintain features

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 23, 2024
@k8s-ci-robot k8s-ci-robot merged commit d73fd71 into kubernetes:master Feb 23, 2024
4 checks passed
alexzielenski added a commit to alexzielenski/kube-openapi that referenced this pull request Feb 23, 2024
kubernetes#454 caused new enums to be emitted which exposed this bug. Some enums are aliases of others and redeclare their enum cases. This change causes duplicate eunm cases to be ignored
alexzielenski added a commit to alexzielenski/kube-openapi that referenced this pull request Feb 23, 2024
kubernetes#454 caused new enums to be emitted which exposed this bug. Some enums are aliases of others and redeclare their enum cases. This change causes duplicate eunm cases to be ignored
alexzielenski added a commit to alexzielenski/kube-openapi that referenced this pull request Feb 23, 2024
kubernetes#454 caused new enums to be emitted which exposed this bug. Some enums are aliases of others and redeclare their enum cases. This change causes duplicate eunm cases to be ignored
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: +enum type used in array is not reflected in Schema
3 participants