Skip to content

Docs generated in output-mode "group" are missing versions for multiversioned APIs #167

Description

@sidharthsurana

For a multi versioned API type, when generating a output-mode "group" rendering, the generated one only contains 1 version of the api.
This is primarily becasue we are overwiting the same named file for all the versions one at a time, thus the last one is what is left generated

primarily due to the following code block we iterate over all the gvd without first grouping them based on the group.

for _, gvd := range gvds {
fileName := fmt.Sprintf("%s.%s", gvd.Group, fileExtension)
file, err := createOutFile(conf.OutputPath, true, fileName)
defer file.Close()
if err != nil {
return err
}
if err := tmpl.ExecuteTemplate(file, mainTemplate, []types.GroupVersionDetails{gvd}); err != nil {
return err
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions