Skip to content
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

Merged
merged 4 commits into from
Aug 24, 2016
Merged

Conversation

danwinship
Copy link
Contributor

follow-ups from review comments on #9227:

  • oc describe didn't support the SDN types
  • swagger docs should use the json/yaml field names, not the go field names
  • the docs weren't entirely useful/accurate/up-to-date

@openshift/networking PTAL

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
Copy link
Contributor

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

Copy link
Contributor Author

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.)

Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor

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.

@dcbw
Copy link
Contributor

dcbw commented Aug 1, 2016

Other than the comments from @stevekuznetsov , LGTM.

@pravisankar
Copy link

LGTM

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 2, 2016
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 2, 2016
@smarterclayton
Copy link
Contributor

[test]

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 13, 2016
@danwinship
Copy link
Contributor Author

Repushed without the uppercase/lowercase changes. Should I file a bug about making the doc generation process fix up the field names automatically?

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 0913137

@stevekuznetsov
Copy link
Contributor

@danwinship sure, the tool lives upstream so file it against k8s please

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7908/)

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 15, 2016
@danwinship
Copy link
Contributor Author

@stevekuznetsov done. ok to merge?

@stevekuznetsov
Copy link
Contributor

LGTM, has @smarterclayton signed off?

@smarterclayton
Copy link
Contributor

Looks good to me.

@stevekuznetsov
Copy link
Contributor

[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Aug 24, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/8385/) (Image: devenv-rhel7_4916)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 0913137

@openshift-bot openshift-bot merged commit a910aa8 into openshift:master Aug 24, 2016
@danwinship danwinship deleted the sdn-docs-and-stuff branch August 27, 2016 20:45
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.

6 participants