Skip to content

Commit 1098a87

Browse files
committed
Changes
1 parent ae7b03d commit 1098a87

File tree

6 files changed

+1564
-70
lines changed

6 files changed

+1564
-70
lines changed

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Linear Fox Specified gitignore
2-
3-
# all
41
/node_modules
52
/.next
63
/.out

next.config.js

+20-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
1-
/** @type {import('next').NextConfig} */
2-
31
const withNextra = require("nextra")({
4-
theme: "nextra-theme-docs",
5-
themeConfig: "./theme.config.tsx",
6-
staticImage: true,
7-
flexsearch: {
2+
theme: "nextra-theme-docs",
3+
themeConfig: "./theme.config.tsx",
4+
staticImage: true,
5+
flexsearch: {
86
codeblocks: false,
9-
},
10-
defaultShowCopyCode: true,
7+
},
8+
defaultShowCopyCode: true,
119
});
12-
10+
1311
module.exports = withNextra({
14-
reactStrictMode: true,
15-
swcMinify: true,
16-
});
12+
reactStrictMode: true,
13+
swcMinify: true,
14+
webpack: (config, { isServer }) => {
15+
if (!isServer) {
16+
config.resolve.fallback = { fs: false };
17+
}
18+
config.module.rules.push({
19+
test: /\.ya?ml$/,
20+
use: 'yaml-loader',
21+
});
22+
return config;
23+
},
24+
});

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
"react": "^18.2.0",
2727
"react-dom": "^18.2.0",
2828
"urlcat": "^3.0.0",
29-
"clsx": "^1.2.1"
29+
"clsx": "^1.2.1",
30+
"swagger-ui-react": "^5.11.9",
31+
"yaml-loader": "^0.8.1"
3032
},
3133
"devDependencies": {
3234
"@types/node": "18.11.10",

pages/api-docs.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react';
2+
import SwaggerUI from 'swagger-ui-react';
3+
import 'swagger-ui-react/swagger-ui.css';
4+
import apiSpec from 'pages/openapi/linearfox-openapi.yml';
5+
6+
const ApiDocs = () => {
7+
return (
8+
<div>
9+
<SwaggerUI spec={apiSpec} />
10+
</div>
11+
);
12+
};
13+
14+
export default ApiDocs;

openapi/linearfox-openapi.yml renamed to pages/openapi/linearfox-openapi.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.0.3
1+
openapi: 3.1.0
22
info:
33
title: Linear Fox OpenAPI
44
description: >
@@ -20,10 +20,10 @@ externalDocs:
2020
servers:
2121
- url: https://api.linearfox.com
2222
description: Main API (Account)
23-
- url: https://ai.api.example.com
23+
- url: https://ai.api.linearfox.com
2424
description: AI - API
25-
- url: https://research.api.example.com
26-
description: Research API
25+
- url: https://research.api.linearfox.com
26+
description: Research API (Test)
2727
components:
2828
securitySchemes:
2929
bearerAuth:

0 commit comments

Comments
 (0)