kubernetes / kube-openapi

Kubernetes OpenAPI spec generation & serving
Apache License 2.0
319 stars 208 forks source link

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

Closed alexzielenski closed 8 months ago

alexzielenski commented 8 months ago

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 commented 8 months ago

[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: - ~~[OWNERS](https://github.com/kubernetes/kube-openapi/blob/master/OWNERS)~~ [alexzielenski] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
Jefftree commented 8 months ago

/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.

alexzielenski commented 8 months ago

/hold cancel

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