Skip to content

Add OpenAPIModelName() generation for v1alpha1 and lib/version types#477

Open
tmshort wants to merge 1 commit intooperator-framework:masterfrom
tmshort:add-openapi-model-names
Open

Add OpenAPIModelName() generation for v1alpha1 and lib/version types#477
tmshort wants to merge 1 commit intooperator-framework:masterfrom
tmshort:add-openapi-model-names

Conversation

@tmshort
Copy link
Contributor

@tmshort tmshort commented Feb 13, 2026

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, and add a generate-openapi Makefile target. Remove broken empty +patchMergeKey tag from SubscriptionStatus.CatalogHealth that blocked generation.

The api_violations.report is 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.

Assisted-By: Claude

Alternative to #476

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, and 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
@openshift-ci openshift-ci bot requested review from anik120 and grokspawn February 13, 2026 19:37
@openshift-ci
Copy link

openshift-ci bot commented Feb 13, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign joelanford for approval. For more information see the Code Review Process.

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

Details 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

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 0% with 116 lines in your changes missing coverage. Please review.
✅ Project coverage is 22.00%. Comparing base (884ff95) to head (5456d2a).

Files with missing lines Patch % Lines
pkg/operators/v1alpha1/zz_generated.model_name.go 0.00% 114 Missing ⚠️
pkg/lib/version/zz_generated.model_name.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #477       +/-   ##
===========================================
- Coverage   37.86%   22.00%   -15.87%     
===========================================
  Files          57       60        +3     
  Lines        4563     7853     +3290     
===========================================
  Hits         1728     1728               
- Misses       2678     5968     +3290     
  Partials      157      157               

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -0,0 +1,5 @@
// +k8s:openapi-gen=true
// +k8s:openapi-model-package=com.coreos.operators.lib.version
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should confirm what this name should be.

// +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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should confirm what this name should be.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant