github.com/pelicanplatform/pelican@v1.0.5/web_ui/frontend/app/api/docs/page.tsx (about) 1 import React from "react"; 2 import 'server-only' 3 4 import fs from "fs" 5 import path from "path" 6 import SwaggerUI from "./SwaggerUI"; 7 import "swagger-ui-react/swagger-ui.css" 8 9 const pelicanSwaggerPath = "app/api/docs/pelican-swagger.yaml" 10 11 function Page() { 12 const pelicanSwagger = fs.readFileSync(path.resolve(process.cwd(), pelicanSwaggerPath), "utf-8") 13 return <SwaggerUI spec={pelicanSwagger} /> 14 } 15 16 export default Page