package templates templ APIExplorer(explorer APIExplorerData) { if !explorer.IsLoggedIn { // Show mode toggle and mock data

Request Body (Example)

{ explorer.Endpoint.RequestBody }

Response (Mock)

{ explorer.Endpoint.Response }
} else { // Show interactive explorer with real execution

Request Body

} } // APIExplorerData holds data for the API explorer component type APIExplorerData struct { Endpoint EndpointInfo IsLoggedIn bool } // EndpointInfo holds information about an API endpoint type EndpointInfo struct { Method string Path string RequestBody string Response string Description string }