Sysl Catalog CLI Reference
info
This command requires the SYSL_PLANTUML environment variable to be set or passed in as a flag. Follow the PlantUML instructions for more details.
Summary#
sysl-catalog is a standalone CLI tool that allows you to generate documentation from your Sysl specifications. It currently supports the following output formats:
- Markdown
- HTML (using GoldMark)
Usage#
usage: sysl-catalog [<flags>] <input>Args:
<input>Input sysl file to generate documentation for
Optional Flags#
--helpShow context-sensitive help (also try --help-long and --help-man).--plantuml=PLANTUMLPlantUML service to use-p, --port=":6900"Port to serve on--type="markdown"Type of output. Supported Formats: (markdown|html)-o, --output=OUTPUTOutput directory to generate to-v, --verboseVerbose logs--templates=TEMPLATESCustom templates to use, separated by a comma--outputFileName=""Output file name for pages;{{.Title}}--serveStart an HTTP server and preview documentation--noCSSDisable adding CSS to served HTML--disableLiveReloadDisable live reload--noImagesDisable images creation--embedEmbed images instead of creating SVGs--mermaidUse Mermaid diagrams where possible (not currently supported)--redocGenerate ReDoc for specs imported from OpenAPI. Must be run on a Git repo.--imageDest=IMAGEDESTOptional image directory destination (can be outside output)
Requirements#
To see an example of a sysl file used to generate documentation, refer to demo.sysl
@packageattribute must be specified:
Currently the package name is not inferred from the application name (MobileApp), so this needs to be added (ApplicationPackage).
MobileApp: @package = "ApplicationPackage" Login(input <: Server.Request): Server <- Authenticate return ok <: MegaDatabase.Empty- Application names might need to be prefixed to parameter types if the type is defined in another application, since defined parameters are under scope of the application it is defined in:
MobileApp: @package = "ApplicationPackage"+ Login(input <: Server.Request):- Login(input <: Request): Server <- Authenticate return ok <: MegaDatabase.Empty- Add
~ignoreto applications/projects that are to be ignored in the Markdown creation:
ThisAppShouldntShow[~ignore]: NotMySystem: ...# Or ignore only specific endpointsThisAppShouldShow: NotMySystem[~ignore]: ...Example#
Troubleshooting#
On macOS, if your launchctl limit maxfiles setting is too low (e.g 256) you might see the error message "too many open files" when running make.
You can set the current session limit higher with:
sudo launchctl limit maxfiles 65536 200000And add the following line to your .bash_profile or analogous file:
ulimit -n 65536 200000