spf13 / cobra

A Commander for modern Go CLI interactions
https://cobra.dev
Apache License 2.0
37.8k stars 2.83k forks source link

The YAML docs gen description and synopsis fields are assigned to the wrong key #2165

Open IanMadd opened 3 months ago

IanMadd commented 3 months ago

In the YAML docs gen the cmd.Long maps to the description and cmd. Short maps to the synopsis.

In the other outputs, it's the reverse. For example, the MD docs gen, the cmd.Short maps to the command description and the cmd.Long maps to the command synopsis.

I think the MD version is correct and short/long fields should be swapped in the YAML generator.