Coder Social home page Coder Social logo

Support for lists about chart-doc-gen HOT 5 OPEN

kubepack avatar kubepack commented on August 23, 2024
Support for lists

from chart-doc-gen.

Comments (5)

tamalsaha avatar tamalsaha commented on August 23, 2024

You are right that lists are not handled. I did not handle it because it is not clear to me how to handle that in the docs. In your example, if here are multiple array elements how does it show up in the doc?

from chart-doc-gen.

robertgates55 avatar robertgates55 commented on August 23, 2024

I think just displaying the index inside square brackets seems to be closest to a standard that I’ve seen - tenants[0], tenants[1] etc - and then leaving it up to users to annotate the different elements accordingly?

from chart-doc-gen.

robertgates55 avatar robertgates55 commented on August 23, 2024

Reread your question:

tenants:
  # Some desc
- name: tenant_name
  features:
    # A feature
  - name: bob
    # Some other desc
    bob: foo

Would get you:
tenants[0].features[0].name

And I think for clarity you’d maybe only ever display the 0th indexed element of any list - comments on eg the second index would be ignored?

from chart-doc-gen.

tamalsaha avatar tamalsaha commented on August 23, 2024

I see that you want to document the structure of the list type values field. If you want to do so, you need to make changes to https://github.com/kubepack/chart-doc-gen/blob/master/walk/associative_sequence.go#L15 file. I am open to prs.

from chart-doc-gen.

norwoodj avatar norwoodj commented on August 23, 2024

@robertgates55 my tool helm-docs supports lists in the way you describe already. Why not give it a try?

@tamalsaha I wonder if you've seen this project. Seems to do basically the same thing you're attempting here but has been around a couple years so has many more features.

from chart-doc-gen.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.