Generate JavaScript API documentation for xk6 plugins

Hello,

I’m wondering if anything exists for helping maintain JavaScript API documentation for xk6 plugins in an automated way. By that I mean, for example, documenting JavaScript constructors and methods with their descriptions and signatures. description of each parameter, etc., such as what can be found in the k6 docs (e.g. BrowserContext).

I have tried to search around for this, but, when I look both at the k6 docs themselves and at extensions, documentation of JavaScript functions, classes, methods, etc. seems to be typically maintained manually.

I’ve tried to look for something similar for Goja as well, but couldn’t find anything.

Is there any existing tool or plan on this direction?

Thank you in advance.

Hi @pcsegal,

Thanks for reaching out. From what I understand we don’t have a tool, most of the docs are manually maintained. This is an interesting topic and I want to discuss internally to provide more expert advice and share if we have any plans on that direction.

Allow us some time, as the person I wanted to talk to is already on vacation, and we’ll get back here after the holiday season. Thanks for your patience.

Cheers!

1 Like

Hello @pcsegal! Unfortunately, the JS API docs have been maintained manually as far as I’m aware.

This could make for a fun project to parse Go source files to generate the JS script documentation, possibly based on Godoc as inspiration. As for current plans to implement such a feature has not been considered at this time.

1 Like