Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

fix: Put example YAML from the provider in configuration block #388

Merged
merged 3 commits into from
Jun 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,15 @@ func (p *Provider) GetProviderConfig(_ context.Context, req *cqproto.GetProvider

data := &yaml.Node{
Kind: yaml.MappingNode,
// HeadComment doesn't work here
Content: []*yaml.Node{
{
Kind: yaml.ScalarNode,
Value: "configuration",
},
{
Kind: yaml.ScalarNode,
Tag: "!!null",
},
{
Kind: yaml.ScalarNode,
// double newline will leave only the last block of comments
Expand Down