Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { jsonRes } from '@/services/backend/response';
import { document } from '@/types/v2alpha/openapi';
import { createOpenApiDocument } from '@/types/v2alpha/openapi';
import { NextApiRequest, NextApiResponse } from 'next';

export default async function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.method === 'GET') {
// Create document at runtime to use the current domain from AppConfig
const document = createOpenApiDocument();
return res.json(document);
}

Expand Down
6 changes: 5 additions & 1 deletion frontend/providers/applaunchpad/src/pages/doc/v2alpha.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
'use client';

import { useMemo } from 'react';
import { ApiReferenceReact } from '@scalar/api-reference-react';
import { getUserKubeConfig } from '@/utils/user';

import { document } from '@/types/v2alpha/openapi';
import { createOpenApiDocument } from '@/types/v2alpha/openapi';

import '@scalar/api-reference-react/style.css';

export default function ApiV2AlphaDocsPage() {
// Create document at runtime to use the current domain from window.location
const document = useMemo(() => createOpenApiDocument(), []);

const config = {
content: document,
authentication: {
Expand Down
Loading
Loading