BoxLang 🚀 A New JVM Dynamic Language Learn More...

Swagger UI Documentation for ColdBox

v1.2.1 Modules

cbSwaggerUI Module

Swagger UI Documentation for ColdBox. It will use the Swagger JSON from the /cbswagger location by default if nothing is configured.

This UI is available at /cbSwaggerUI - where you will see a visual representation of your Swagger docs.

This module loads a standalone version of Swagger-UI.

The code can be found at:

This code is based on the basic distribution of the files at

This module is a packaged version of that distribution with some settings being configured via Module Settings.


Please see the Swagger UI license at

Install cbSWaggerUI ( via Commandbox )

box install cbSwaggerUI

Note: Omit the box from your command, if you are already in the Commandbox interactive shell


If you just want to use this with cbSwagger, there is nothing else to configure (assuming you have cbSwagger installed.)

You can configure the following settings:


An array of Swagger JSON files. You can either specify an array of one or more URLs or an array of structs with a url and name. If you do not set a value

Default: [ "/cbswagger" ]


"swaggerFiles" : [ "/cbswagger" ]

"swaggerFiles" : [ "/cbswagger", "" ]

"swaggerFiles" : [
    {url: "/cbswagger", name: "cbswagger"},
    {url: "", name: "Petstore"}


If setting multiple URLs with names, it will load the matched value by default. If not set it will use the first URL in the SwaggerFiles array.


If set to true, enables deep linking for tags and operations.

Default: true


Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 'method' (sort by HTTP method) or a function (see Array.prototype.sort() to know how sort function works).

Default: method


Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function.

Default: alpha


If set, enables filtering. The top bar will show an edit box that you can use to filter the tagged operations that are shown.

Default: true


There is sometimes an issue where there is an error this error displays even if the Swagger is valid.

"Could not render n, see the console."

Setting this to true will turn off that error via CSS.

Default: true

Example ColdBox.cfc configuration:

moduleSettings = {
    cbswaggerUI : {
            "swaggerFiles" : [
                {url: "/cbswagger", name: "cbswagger"},
                {url: "", name: "Petstore"}

$ box install cbSwaggerUI

No collaborators yet.
  • {{ getFullDate("2022-04-01T23:20:01Z") }}
  • {{ getFullDate("2023-11-29T15:27:16Z") }}
  • 2,645
  • 9,587