Skip to content

Commit

Permalink
update website config to use folder
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-gohri committed Mar 8, 2024
1 parent fb4a3a8 commit 638d69d
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 27 deletions.
29 changes: 4 additions & 25 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,17 @@ const config: Config = {
{
debug: Boolean(process.env.DEBUG || process.env.CI),
config: path.join(__dirname, 'redocly.yaml'),
openapi: {
folder: 'openapi',
routeBasePath: '/examples',
},
specs: [
{
id: 'using-single-yaml',
spec: 'openapi/single-file/openapi.yaml',
route: '/examples/using-single-yaml/',
},
{
id: 'using-multi-file-yaml',
spec: 'openapi/multi-file/openapi.yaml',
route: '/examples/using-multi-file-yaml/',
},
{
id: 'using-swagger-json',
spec: 'openapi/swagger/swagger.json',
route: '/examples/using-swagger-json/',
},
{
id: 'using-remote-url',
// Remote File
spec: 'https://redocly.github.io/redoc/openapi.yaml',
route: '/examples/using-remote-url/',
},
{
id: 'using-custom-page',
spec: 'openapi/single-file/openapi.yaml',
// NOTE: no `route` passed, instead data used in custom React Component ('custom-page/index.jsx')
},
{
id: 'using-custom-layout',
spec: 'openapi/single-file/openapi.yaml',
// NOTE: no `route` passed, instead data used in custom React Component ('custom-layout/index.jsx')
},
],
theme: {
/**
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion website/src/pages/examples/custom-layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Redoc from '@theme/Redoc';
import useSpecData from '@theme/useSpecData';

function CustomPage() {
const specData = useSpecData('using-custom-layout');
const specData = useSpecData('using-single-yaml');
return (
<Layout
title="Custom Layout Docs"
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/examples/custom-page/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ApiDoc from '@theme/ApiDoc';
import useSpecData from '@theme/useSpecData';

function CustomPage() {
const specData = useSpecData('using-custom-page');
const specData = useSpecData('using-single-yaml');

return (
<ApiDoc
Expand Down

0 comments on commit 638d69d

Please sign in to comment.