Interface SpecConfiguration

Top-level configuration passed to AppProvider.

Describes where to load the OpenAPI document and how to talk to the API and auth server. See the README for the spec extensions react-openapi expects (x-primary-key, x-display-format, x-list-columns, x-order, x-label, x-fk, x-sse, x-profile, ...).

interface SpecConfiguration {
    baseApiUrl?: string;
    getToken?: () => null | string;
    profileComponents?: ProfileComponents;
    resourceConfig?: Record<string, ResourceConfiguration>;
    specUrl: string;
    title?: string;
}

Properties

baseApiUrl?: string

Base URL of the API; defaults to the spec's first servers[].url.

getToken?: () => null | string

Called to obtain the current bearer token for API requests.

profileComponents?: ProfileComponents

Components for x-profile operations (profile view/edit/create).

resourceConfig?: Record<string, ResourceConfiguration>

Per-resource UI overrides keyed by resource name.

specUrl: string

URL of the OpenAPI JSON/YAML document to load.

title?: string

Overrides the app/site title shown in the layout.