Skip to content

Commit 37e8de5

Browse files
committed
More swagger
1 parent 491d8d9 commit 37e8de5

File tree

9 files changed

+70
-41
lines changed

9 files changed

+70
-41
lines changed

docs/BCF/Fallback.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from "react";
2+
3+
export const Fallback = (
4+
<div style={{ minHeight: "calc(100vh - var(--ifm-navbar-height))" }} />
5+
);
6+
7+
export default Fallback;

docs/BCF/Swagger UI Beta.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import APISwagger from './api-swagger';
2+
3+
<APISwagger />
4+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import APISwagger from './api-swagger';
2+
3+
<APISwagger />
4+

docs/BCF/Swagger UI.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import APISwagger from './api-swagger';
2+
3+
<APISwagger />
4+

docs/BCF/Swagger.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import SwaggerUI from "swagger-ui-react";
2+
import "swagger-ui-react/swagger-ui.css";
3+
4+
export function Swagger() {
5+
return (
6+
<SwaggerUI
7+
url={
8+
"https://raw.githubusercontent.com/markholland/catenda-openapi/main/catenda-bcf-v3.0.yaml"
9+
}
10+
/>
11+
);
12+
}
13+
14+
export default Swagger;

docs/BCF/api-swagger.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import React, { Suspense } from "react";
2+
import BrowserOnly from "@docusaurus/BrowserOnly";
3+
import { Fallback } from "./Fallback";
4+
5+
const LazySwagger = React.lazy(() => import("./Swagger"));
6+
7+
export default function Api() {
8+
return (
9+
<BrowserOnly>
10+
{() => (
11+
<Suspense fallback={Fallback}>
12+
<LazySwagger />
13+
</Suspense>
14+
)}
15+
</BrowserOnly>
16+
);
17+
}

docs/Viewer 2D/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Bimsync Viewer 2D requires [jQuery 1.x](http://jquery.com/) to run.
1212

1313
The Viewer 2D API can be automatically initialized by using the DOM data API or manually initialized in JavaScript.
1414

15-
**Note** In the example below, nothing will be displayed until you use the [showStorey](/developers/reference/viewer-2d#showstorey)
15+
**Note** In the example below, nothing will be displayed until you use the [showStorey](/)
1616

17-
**Note** If you are using the Viewer 3D API and want a predefined 2D/3D integration you can use our [Viewer Widget API](/developers/reference/viewer-ui/1.0).
17+
**Note** If you are using the Viewer 3D API and want a predefined 2D/3D integration you can use our [Viewer Widget API](/).
1818

1919
## DOM Data API
2020

@@ -70,15 +70,15 @@ The Viewer 2D API can be automatically initialized by using the DOM data API or
7070
</html>
7171
```
7272

73-
1. Create a viewer access token by using the **POST v2/projects/:project/viewer2d/token** described in the [Bimsync REST API](/developers/reference/api/v2#create-viewer2d-token).
73+
1. Create a viewer access token by using the **POST v2/projects/:project/viewer2d/token** described in the [Bimsync REST API](/).
7474

7575
2. Add the Viewer 2D framework to you application.
7676

7777
3. Create a Viewer 2D element. The data attribute _data-viewer2d="svg"_ must be included. The data attribute _data-url_ must be the _url_ field from a viewer access token.
7878

7979
## JavaScript
8080

81-
1. Create a viewer access token by using the **POST v2/projects/:project/viewer2d/token** described in the [Bimsync REST API](/developers/reference/api/v2#create-viewer2d-token).
81+
1. Create a viewer access token by using the **POST v2/projects/:project/viewer2d/token** described in the [Bimsync REST API](/).
8282

8383
2. Create a DIV element which will contain the 2D-viewer.
8484

docs/Viewer 3D/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ The viewer can either be automatically initialized by using the DOM data API or
2525
></div>
2626
```
2727

28-
1. Create a viewer access token by using the **POST v2/projects/:project/viewer3d/token** resources in the [Bimsync REST API](/developers/reference/api/v2#create-viewer3d-token).
28+
1. Create a viewer access token by using the **POST v2/projects/:project/viewer3d/token** resources in the [Bimsync REST API](/).
2929

3030
2. Add the viewer framework to you application:
3131

3232
3. Create a viewer instance. The data attribute _data-viewer_ must have the value _webgl_. The data attribute _data-url_ must be the _url_ field from a viewer access token.
3333

34-
To enable the [Viewer UI plugin](/developers/reference/viewer-ui/1.0), add the data attribute, _data-ui_, to the viewer element. See the [Viewer UI plugin documentation](/developers/reference/viewer-ui/1.0) for more info.
34+
To enable the [Viewer UI plugin](/), add the data attribute, _data-ui_, to the viewer element. See the [Viewer UI plugin documentation](/) for more info.
3535

3636
### JavaScript
3737

@@ -62,11 +62,11 @@ To enable the [Viewer UI plugin](/developers/reference/viewer-ui/1.0), add the d
6262
</script>
6363
```
6464

65-
1. Create a viewer access token by using the **POST v2/projects/:project/viewer3d/token** resources in the [Bimsync REST API](/developers/reference/api/v2#create-viewer3d-token).
65+
1. Create a viewer access token by using the **POST v2/projects/:project/viewer3d/token** resources in the [Bimsync REST API](/).
6666

6767
2. Create a DIV element which will contain the viewer.
6868

69-
To enable the [Viewer UI plugin](/developers/reference/viewer-ui/1.0), a parameter could be passed to the bimsync.load() method. See the [Viewer UI plugin documentation](/developers/reference/viewer-ui/1.0) for more info.
69+
To enable the [Viewer UI plugin](/), a parameter could be passed to the bimsync.load() method. See the [Viewer UI plugin documentation](/) for more info.
7070

7171
# Options
7272

sidebars.ts

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,19 @@ const sidebars: SidebarsConfig = {
1515
'BCF/index',
1616
'BCF/Introduction/issue-boards',
1717
{
18-
type: 'category',
19-
label: 'API',
20-
link: {
21-
type: 'generated-index',
22-
slug: 'BCF/API',
23-
},
24-
items: [
25-
'BCF/API/Comment',
26-
'BCF/API/Document',
27-
],
18+
type: 'doc',
19+
id: 'BCF/Swagger UI',
20+
label: 'API Explorer',
2821
},
2922
{
30-
type: 'category',
31-
label: 'BCF v2.1',
32-
link: {
33-
type: 'generated-index',
34-
slug: 'BCF/BCF 2.1/API',
35-
},
36-
items: [
37-
'BCF/BCF 2.1/API/Comment',
38-
'BCF/BCF 2.1/API/Document',
39-
],
23+
type: 'doc',
24+
id: 'BCF/Swagger UI Beta',
25+
label: 'Beta API Explorer',
4026
},
4127
{
42-
type: 'category',
43-
label: 'BCF v2.0',
44-
link: {
45-
type: 'generated-index',
46-
slug: 'BCF/BCF 2.0/API',
47-
},
48-
items: [
49-
'BCF/BCF 2.0/API/Comment',
50-
'BCF/BCF 2.0/API/Document',
51-
],
28+
type: 'doc',
29+
id: 'BCF/Swagger UI Development',
30+
label: 'Development API Explorer',
5231
}
5332
],
5433
cdeSidebar: [
@@ -57,17 +36,17 @@ const sidebars: SidebarsConfig = {
5736
{
5837
type: 'doc',
5938
id: 'OpenCDE/Swagger UI',
60-
label: 'API',
39+
label: 'API Explorer',
6140
},
6241
{
6342
type: 'doc',
6443
id: 'OpenCDE/Swagger UI Beta',
65-
label: 'Beta API',
44+
label: 'Beta API Explorer',
6645
},
6746
{
6847
type: 'doc',
6948
id: 'OpenCDE/Swagger UI Development',
70-
label: 'Development API',
49+
label: 'Development API Explorer',
7150
}
7251
],
7352
viewer2DSidebar: [

0 commit comments

Comments
 (0)