-
Notifications
You must be signed in to change notification settings - Fork 68
📖 Updating docs strings for API go definitions #2359
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
base: main
Are you sure you want to change the base?
📖 Updating docs strings for API go definitions #2359
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2359 +/- ##
==========================================
- Coverage 74.45% 74.42% -0.03%
==========================================
Files 93 93
Lines 7300 7300
==========================================
- Hits 5435 5433 -2
- Misses 1433 1434 +1
- Partials 432 433 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c783c59 to
94c502d
Compare
94c502d to
91daf1f
Compare
|
The CRD diff is only the text. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tmshort 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 |
| //+kubebuilder:printcolumn:name=Age,type=date,JSONPath=`.metadata.creationTimestamp` | ||
|
|
||
| // ClusterCatalog enables users to make File-Based Catalog (FBC) catalog data available to the cluster. | ||
| // The ClusterCatalog resource makes File-Based Catalog (FBC) data available to your cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should follow the godoc format where the comment starts with name of the property/field as it was =/
I learned this recently in the ClusterExtensionRevision API doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually https://github.com/openshift/enhancements/blob/master/dev-guide/api-conventions.md#use-json-field-names-in-godoc recommends lowercase variant.
| // The spec field defines the desired state of the ClusterCatalog. | ||
| // The spec field is required. | ||
| // The controller ensures that the catalog is unpacked and served over the catalog content HTTP server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these docs will be converted into docs for the users with kubectl explain, we use the user face facing field name, i.e. lowercase (i.e. instead of // Spec we do // spec)
| // The spec field defines the desired state of the ClusterCatalog. | |
| // The spec field is required. | |
| // The controller ensures that the catalog is unpacked and served over the catalog content HTTP server. | |
| // spec is a required field that defines the desired state of the ClusterCatalog. | |
| // The controller ensures that the catalog is unpacked and served over the catalog content HTTP server. |
perdasilva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we should follow the godoc standard with the yaml field names (lowercase) by convention. I've left a couple of illustrative suggestions. If we make those slight adjustments, everything else should be ok, I think.
Description
Helping @perdasilva by updating the docs strings for the API definitions.
🤞 I did this right :)
Reviewer Checklist