Skip to main content

SDK documentation

As part of SDK generation, liblab will by default generate SDK documentation for all the languages you have configured, as well as API documentation. This SDK documentation is available as a static site, and can be downloaded to be self hosted, or can be hosted by liblab.

Generate SDK documentation

When you generate your SDK with the liblab build CLI command, SDK documentation is also generated.

✓ Doc built
SDKs downloaded successfully. You can find them inside the "output" folder
Action Link
──────── ─────────────────────────────────────────────────────────────────────────────────────────────────────────────
Preview https://docs.liblab.com/liblab/preview/1ebe91ad-e08e-40ea-b05c-1808bc2dfcd3
Download https://prod-liblab-api-stack-docs.s3.us-east-1.amazonaws.com/1ebe91ad-e08e-40ea-b05c-1808bc2dfcd3/bundle.zip

Two links are provided in the CLI output - a link to preview the docs, and a link to download them as a zip file.

note

This preview is only temporary to review the docs, and should not be used for hosting the docs long term as these will be removed after a short while.

SDK documentation preview

You can select the SDK language from the drop down at the top right. Select cURL to see the API documentation, otherwise select the SDK language, such as Java, Python or TypeScript.

Approve SDK documentation

Once you are happy with the documentation, you can approve it and have it published and hosted by liblab. This can be done interactively when running liblab build:

✓ Doc built
SDKs downloaded successfully. You can find them inside the "output" folder
Action Link
──────── ─────────────────────────────────────────────────────────────────────────────────────────────────────────────
Preview https://docs.liblab.com/liblab/preview/1ebe91ad-e08e-40ea-b05c-1808bc2dfcd3
Download https://prod-liblab-api-stack-docs.s3.us-east-1.amazonaws.com/1ebe91ad-e08e-40ea-b05c-1808bc2dfcd3/bundle.zip
? Would you like to approve and publish these docs now? (Y/n)

Select Y to approve the docs, and they will be published and hosted by liblab.

? Would you like to approve and publish these docs now? Yes
The docs have been published: view them at https://docs.liblab.com/liblab/exciting.soda/0.1.0

You can also auto approve the docs during the build process by passing the --approve-docs flag to the liblab build command.

liblab build --approve-docs

This is useful during an automated build, such as in a CI/CD pipeline.

Turn off documentation generation

To turn off documentation generation, set the createDocs option to false in your liblab config file.

{
"createDocs": false
}