package templates templ APIExplorer(explorer APIExplorerData) { if !explorer.IsLoggedIn {
if explorer.Endpoint.Method == "GET" { { explorer.Endpoint.Method } } else if explorer.Endpoint.Method == "DELETE" { { explorer.Endpoint.Method } } else if explorer.Endpoint.Method == "POST" { { explorer.Endpoint.Method } } else { { explorer.Endpoint.Method } } { explorer.Endpoint.Path }

Request Body (Example)

{ explorer.Endpoint.RequestBody }

Response (Mock)

{ explorer.Endpoint.Response }
} else {
if explorer.Endpoint.Method == "GET" { { explorer.Endpoint.Method } } else if explorer.Endpoint.Method == "DELETE" { { explorer.Endpoint.Method } } else if explorer.Endpoint.Method == "POST" { { explorer.Endpoint.Method } } else { { explorer.Endpoint.Method } } { explorer.Endpoint.Path }
} } // 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 }