-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
SDN docs and stuff #10143
SDN docs and stuff #10143
Conversation
type ClusterNetwork struct { | ||
unversioned.TypeMeta `json:",inline"` | ||
// Standard object's metadata. | ||
kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||
|
||
// Network is a CIDR string to specify the global overlay network's L3 space | ||
// network is a CIDR string specifying the global overlay network's L3 space |
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.
I think we want to keep these as uppercase to be valid Godoc as that's more important than it being consistent with the generated swaggerdoc for the json field name
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.
@stevekuznetsov @smarterclayton explicitly requested lowercase field names in docs in #9227 (comment). (Though it seems that only pkg/build currently follows that convention.)
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.
@smarterclayton that's surprising ... why do we want this?
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.
This Godoc is turned into swagger, which is read by humans in the context of JSON responses. Someone reading swagger will never see the Go types, they will only ever see the JSON responses. Returning the Go type name is thus not useful to them, while the JSON field name is.
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.
Right, but why don't we want Godoc to read correctly for developers using the lib? I think the correct approach here would be to edit the comments programmatically when we generate Swagger descriptions from them. It doesn't feel right to break Godoc conventions to appease some code generator downstream.
Other than the comments from @stevekuznetsov , LGTM. |
LGTM |
c002f1e
to
b7d116b
Compare
[test] |
b7d116b
to
0913137
Compare
Repushed without the uppercase/lowercase changes. Should I file a bug about making the doc generation process fix up the field names automatically? |
Evaluated for origin test up to 0913137 |
@danwinship sure, the tool lives upstream so file it against k8s please |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7908/) |
@stevekuznetsov done. ok to merge? |
LGTM, has @smarterclayton signed off? |
Looks good to me. |
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/8385/) (Image: devenv-rhel7_4916) |
Evaluated for origin merge up to 0913137 |
follow-ups from review comments on #9227:
oc describe
didn't support the SDN types@openshift/networking PTAL