Add OpenAPIModelName() generation for v1alpha1 and lib/version types#477
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #477 +/- ##
===========================================
- Coverage 37.86% 22.13% -15.74%
===========================================
Files 57 60 +3
Lines 4563 7869 +3306
===========================================
+ Hits 1728 1742 +14
- Misses 2678 5969 +3291
- Partials 157 158 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pkg/lib/version/doc.go
Outdated
| @@ -0,0 +1,5 @@ | |||
| // +k8s:openapi-gen=true | |||
| // +k8s:openapi-model-package=com.coreos.operators.lib.version | |||
There was a problem hiding this comment.
We should confirm what this name should be.
There was a problem hiding this comment.
@jianzhangbjz you had:
com.github.operator-framework.api.pkg.operators.lib.version
There was a problem hiding this comment.
I changed it to be:
com.github.operator-framework.api.pkg.operators.lib.version
pkg/operators/v1alpha1/doc.go
Outdated
| // +k8s:deepcopy-gen=package | ||
| // +k8s:conversion-gen=github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators | ||
| // +k8s:openapi-gen=true | ||
| // +k8s:openapi-model-package=com.coreos.operators.v1alpha1 |
There was a problem hiding this comment.
We should confirm what this name should be.
There was a problem hiding this comment.
@jianzhangbjz you had:
com.github.operator-framework.api.pkg.operators.v1alpha1
There was a problem hiding this comment.
I changed it to be:
com.github.operator-framework.api.pkg.operators.v1alpha1
|
/lgtm In principle it seems fine. It would be good to get more on the motivation for this change in the PR description. Maybe some better formatting in the description (maybe bullet points) would be good too =D |
It's an alternative to #476 |
5456d2a to
ec1a893
Compare
Use openapi-gen from k8s.io/kube-openapi to generate OpenAPIModelName() accessor functions and OpenAPI schema definitions. * Add openapi-gen to bingo. * add +k8s:openapi-gen and +k8s:openapi-model-package markers to pkg/operators/v1alpha1 and pkg/lib/version. * Add a generate-openapi Makefile target. * Remove broken empty +patchMergeKey tag from SubscriptionStatus.CatalogHealth that blocked generation. Signed-off-by: Todd Short <todd.short@me.com> Assisted-By: Claude
ec1a893 to
1fc710b
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
7641ce3
into
operator-framework:master
Use openapi-gen from k8s.io/kube-openapi to generate OpenAPIModelName() accessor functions and OpenAPI schema definitions.
The
api_violations.reportis a file created by openapi-gen, and it's required if we don't want to error out without fixing the violations. Because it's checked in, we can use it as part of the verify CI/review process to ensure nothing new is added.Alternative to #476, which had in its description:
Assisted-By: Claude