This is a utility class for Jervis admins to generate documentation on the fly for their specific environment. An admin will bring their own platforms.json, a JSON file for language lifecycles for each operating system they support, and a JSON file for language toolchains for each operating system they support. Without this generator, managing documentation for a custom solution is very hard. This documentation generator was developed to make managing docs a little easier for Jervis platforms and environments.
To run this example, clone Jervis and execute ./gradlew console to bring up a Groovy Console with the classpath set up.
import net.gleske.jervis.tools.SupportDocumentationGenerator as Doc
Doc docs = new Doc()
println docs.supportByOS
Type | Name and description |
---|---|
Map |
jsonFiles Contains the parsed content of all Jervis JSON files such as platforms, lifecycles, and toolchains for every OS. |
String |
serviceName |
Map |
supportByOS |
Map |
templates Groovy templates for generating documenation. |
Constructor and description |
---|
SupportDocumentationGenerator
() |
SupportDocumentationGenerator
(Map args) |
Type Params | Return Type | Name and description |
---|---|---|
|
String |
getLifecycleDocumentation(String os = '') Get the full supported language documentation for a given operating system. |
|
String |
getLifecycleDocumentation(String os, String language) Return markdown documentation for a given OS supporting a language. |
Contains the parsed content of all Jervis JSON files such as platforms, lifecycles, and toolchains for every OS. Each key is the name of the JSON file but without .json extension, without -stable.json, or without -unstable.json depending on default stability.
Groovy templates for generating documenation.
The following templates are supported.
Jervis API documentation.