moco icon indicating copy to clipboard operation
moco copied to clipboard

Lack of line breaks in auto-generated API documents

Open masa213f opened this issue 2 years ago • 1 comments

What

The API documents are not rendor as we expected.

  • Blank lines in comments are converted to \n\n.
  • Bullet points don't have a trailing newline.

(1) Structure Description

Source comment

https://github.com/cybozu-go/moco/blob/v0.12.0/api/v1beta1/backuppolicy_types.go#L11-L24

// BackupPolicySpec defines the configuration items for MySQLCluster backup.[ymmt, 11 months ago: • Add API resources for backup and restore](https://sourcegraph.com/github.com/cybozu-go/moco/-/commit/250860ff212b56d22335e76851b09dea7a62037a)
//
// The following fields will be copied to CronJob.spec:
//
// - Schedule
// - StartingDeadlineSeconds
// - ConcurrencyPolicy
// - SuccessfulJobsHistoryLimitYusuke Suzuki, 10 months ago: • Add History Limit to BackupPolicySpec
// - FailedJobsHistoryLimit
//
// The following fields will be copied to CronJob.spec.jobTemplate.
//
// - ActiveDeadlineSeconds
// - BackoffLimit
generated document

https://github.com/cybozu-go/moco/blob/v0.12.0/docs/crd_backuppolicy_v1beta1.md#backuppolicyspec

BackupPolicySpec defines the configuration items for MySQLCluster backup.\n\nThe following fields will be copied to CronJob.spec:\n\n- Schedule - StartingDeadlineSeconds - ConcurrencyPolicy - SuccessfulJobsHistoryLimit - FailedJobsHistoryLimit\n\nThe following fields will be copied to CronJob.spec.jobTemplate.\n\n- ActiveDeadlineSeconds - BackoffLimit

(2) Field Description

Source comment

https://github.com/cybozu-go/moco/blob/v0.12.0/api/v1beta2/mysqlcluster_types.go#L56-L63

	// Collectors is the list of collector flag names of mysqld_exporter.
	// If this field is not empty, MOCO adds mysqld_exporter as a sidecar to collect
	// and export mysqld metrics in Prometheus format.
	//
	// See https://github.com/prometheus/mysqld_exporter/blob/master/README.md#collector-flags for flag names.
	//
	// Example: ["engine_innodb_status", "info_schema.innodb_metrics"]
	// +optional
generated document

https://github.com/cybozu-go/moco/blob/v0.12.0/docs/crd_mysqlcluster_v1beta2.md#mysqlclusterspec

Collectors is the list of collector flag names of mysqld_exporter. If this field is not empty, MOCO adds mysqld_exporter as a sidecar to collect and export mysqld metrics in Prometheus format.\n\nSee https://github.com/prometheus/mysqld_exporter/blob/master/README.md#collector-flags for flag names.\n\nExample: ["engine_innodb_status", "info_schema.innodb_metrics"]

How

Describe how to address the issue.

Checklist

  • [ ] Finish implementation of the issue
  • [ ] Test all functions
  • [ ] Have enough logs to trace activities
  • [ ] Notify developers of necessary actions

masa213f avatar Apr 25 '22 02:04 masa213f

I contacted the author of the tool. https://github.com/clamoriniere/crd-to-markdown/issues/1

masa213f avatar Apr 25 '22 02:04 masa213f