Skip to content

Web App Options

1 min read

Import: import system.webapi;

See the Web APIs guide for runnable examples, lifecycle, and error behavior.

WebAppOptions

API metadata and documentation endpoints. Empty URLs disable endpoints; transport settings, including TLS, belong to ServerConfig.

public class WebAppOptions

title

Title displayed in the API documentation.

public title: string

version

Version identifying this API or snapshot format.

public version: string

docs_url

Path serving Swagger UI; an empty path disables it.

public docs_url: string

openapi_url

Path serving the OpenAPI document.

public openapi_url: string

redoc_url

Path serving ReDoc; an empty path disables it.

public redoc_url: string

summary

Short summary displayed in the API documentation.

public summary: string

description

Description displayed in the API documentation.

public description: string

terms_of_service

URL describing the API's terms of service.

public terms_of_service: string

swagger

Options controlling the interactive API documentation.

public swagger: SwaggerOptions

constructor

Creates a WebAppOptions with title, version, docs_url, openapi_url, redoc_url, summary, description, terms_of_service.

public constructor(
    title: string = "Dream API",
    version: string = "0.1.0",
    docs_url: string = "/docs",
    openapi_url: string = "/openapi.json",
    redoc_url: string = "/redoc",
    summary: string = "",
    description: string = "",
    terms_of_service: string = ""
)