diff --git a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/metadata_writer_test.go b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/metadata_writer_test.go index 9350d1646459..cac82e295124 100644 --- a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/metadata_writer_test.go +++ b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/metadata_writer_test.go @@ -14,6 +14,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema" ) @@ -21,7 +22,7 @@ import ( func TestMetadataFileWriter(t *testing.T) { tempDir := t.TempDir() w := newMetadataFileWriter(tempDir) - err := w.write(configschema.CfgInfo{Group: "mygroup", Type: "mytype"}, []byte("hello")) + err := w.write(configschema.CfgInfo{Group: "mygroup", Type: component.MustNewType("mytype")}, []byte("hello")) require.NoError(t, err) file, err := os.Open(filepath.Join(tempDir, "mygroup", "mytype.yaml")) require.NoError(t, err) diff --git a/cmd/configschema/docsgen/docsgen/cli.go b/cmd/configschema/docsgen/docsgen/cli.go index 5c3069c804c9..10b7a536e02f 100644 --- a/cmd/configschema/docsgen/docsgen/cli.go +++ b/cmd/configschema/docsgen/docsgen/cli.go @@ -105,7 +105,7 @@ func writeConfigDoc( panic(err) } - mdBytes := renderHeader(string(ci.Type), ci.Group, f.Doc) + mdBytes := renderHeader(ci.Type.String(), ci.Group, f.Doc) f.Name = typeToName(f.Type)