Skip to content

Commit

Permalink
feat: adding stoplight elements
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyxiao committed Nov 26, 2023
1 parent 1d8bb6e commit 075ce5d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions apps/web/pages/api/v0/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type {NextApiRequest, NextApiResponse} from 'next'

export default function handler(_: NextApiRequest, res: NextApiResponse) {
// https://github.com/stoplightio/elements
res.status(200).send(`
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Elements in HTML</title>
<!-- Embed elements Elements via Web Component -->
<script src="https://unpkg.com/@stoplight/elements/web-components.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@stoplight/elements/styles.min.css">
</head>
<body>
<elements-api
apiDescriptionUrl="/api/v0/openapi.json"
router="hash"
layout="sidebar"
/>
</body>
</html>
`)
}

0 comments on commit 075ce5d

Please sign in to comment.