Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: 3scale title trait invalid when generating documentation #3972

Open
gansheer opened this issue Jan 11, 2023 · 0 comments
Open
Labels
area/documentation Documentation task kind/bug Something isn't working

Comments

@gansheer
Copy link
Contributor

The document generation make command make generate generates the docs/modules/ROOT/nav.adoc file with inside :

...
 // Start of autogenerated code - DO NOT EDIT! (trait-nav)
** xref:traits:3scale.adoc[3Scale]
** xref:traits:affinity.adoc[Affinity]
...

The bug : 3Scale should be 3scale (small 's'): https://www.3scale.net/

The generation command use for the title:

  • the following flag in trait comments:
    // +camel-k:trait=3scale.
  • the generation following code:
    func traitNameFromFile(file string) string {
    name := strings.TrimSuffix(file, ".adoc")
    name = strings.ReplaceAll(name, "trait", "")
    name = strings.ReplaceAll(name, "-", " ")
    name = strings.Trim(name, " ")
    name = cases.Title(language.English).String(name)
    return name
    }

Adding a way to override the default generation code for a specified code would fix the bug and help give mode flexibility.

Ref : #3970 (comment)

@squakez squakez added area/documentation Documentation task kind/bug Something isn't working labels Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Documentation task kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants