Skip to content

Commit 50385ae

Browse files
committed
add init apispec
1 parent b0373b9 commit 50385ae

File tree

2 files changed

+1227
-8
lines changed

2 files changed

+1227
-8
lines changed

src/App.tsx

+2-8
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,15 @@ import ReadJSONYAMLfile from './components/Readfile/Readfile'
44
import Editor from './components/Editor/Editor';
55
import ReactSplitPane from './components/SplitPane/SplitPane';
66
import SwaggerUI from 'swagger-ui-react';
7+
import petStoreAPISpec from './assets/petstore.apispec.json';
78

89
function App() {
910
const [ content, setContent ] = useState<string | undefined>();
1011

1112
useEffect(() => {
1213
// Check IndexedDB to grab API Specification
1314
// if there is no exsiting spec.
14-
const initialSpec = {
15-
"openapi":"3.1.0",
16-
"info": {
17-
"title": "my api specification"
18-
}
19-
}
20-
21-
setContent(JSON.stringify(initialSpec, null, 2));
15+
setContent(JSON.stringify(petStoreAPISpec, null, 2));
2216
}, [])
2317
return (
2418
<>

0 commit comments

Comments
 (0)