kubernetes / kube-openapi

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

Adds support for Symbol references in defaults #419

Closed alexzielenski closed 1 year ago

alexzielenski commented 1 year ago

gengo's Defaulter-gen has support for symbol references to be used as defaults in the form +default=ref(package/of/symbol.Name)

This PR exposes defaults declared as symbols into the OpenAPI

depends on https://github.com/kubernetes/gengo/pull/247

alexzielenski commented 1 year ago

/cc @apelisse

alexzielenski commented 1 year ago

added integration test, removed change to mustEnforceDefault we were unsure about

apelisse commented 1 year ago

/lgtm /approve

k8s-ci-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexzielenski, apelisse

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)~~ [apelisse] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
apelisse commented 1 year ago

@thockin !!