Function Admin

  • Root admin UI driven entirely by the loaded OpenAPI spec.

    Reads resources from useAppContext and renders a Layout with a SideMenu plus nested routes per resource: /<basePath>/<resource> (list), /<resource>/new (create), /<resource>/:id (detail) and /<resource>/:id/edit. Streaming (x-sse) resources render only the list. While the spec is loading it shows a spinner; spec validation errors are shown via ValidationAlert; warnings are shown as a dismissible alert above the layout.

    Notes:

    • Must be rendered inside an AppProvider and a router.
    • The index route redirects to the first top-level resource.

    Props: see AdminProps.

    Parameters

    Returns Element

    <Route path="/admin/*" element={<Admin basePath="/admin" />} />