Comments (47)
Since we are still in v2 beta yet, shall we consider making v2 release #439 compatible with docusaurus 3?
from docusaurus-openapi-docs.
3.0.0-beta.3
It worked for me like this
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
docRootComponent: "@theme/DocRoot",
docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi
},
blog: {
showReadingTime: true,
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
versions:
"@docusaurus/core": "3.0.1",
"@docusaurus/preset-classic": "3.0.1",
"docusaurus-plugin-openapi-docs": "3.0.0-beta.3",
"docusaurus-theme-openapi-docs": "3.0.0-beta.3",
from docusaurus-openapi-docs.
Thanks @jcwillox, have you seen the changes proposed in #648?
Oh look at that, that's very similar to what I did but an even nicer output 👍, should fix the same issue with mdx, I believe the main issue was multiple opening tags on one line.
from docusaurus-openapi-docs.
3.0.0-beta.1
works for me with Docusaurus 3.0.1
, except for the highlighting as @jcwillox noted. For my documentation I also noticed that I had to add json
and bash
to additionalLanguages
to fix the highlighting for these, while this was not needed for previous Docusaurus versions.
With 3.0.0
I get Hook is called outside the <DocProvider>
. However, I had this issue with previous versions as well and am not quite sure if it is completely related.
Great work on the quick release!
from docusaurus-openapi-docs.
![image](https://private-user-images.githubusercontent.com/10626596/280380986-fe4a8ceb-e79b-4648-935d-272863e83466.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDYzNzYzODcsIm5iZiI6MTcwNjM3NjA4NywicGF0aCI6Ii8xMDYyNjU5Ni8yODAzODA5ODYtZmU0YThjZWItZTc5Yi00NjQ4LTkzNWQtMjcyODYzZTgzNDY2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTI3VDE3MjEyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk4ZmVjMzkyZmM3YjI4MjVjOGE2MWM2MzVlYzVhNWFmNzE5YWFhMzgyNjRjYTc0MDNmZGYwMDgxOWUxMTFlZDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.kmYjdtnLduE2nroIet5vLY09icx6CcCQcBI5O8mV9-s)
https://docusaurus.io/blog/preparing-your-site-for-docusaurus-v3#unintended-extra-paragraphs
from docusaurus-openapi-docs.
I managed to fix the MDX output with this simple patch, it's very rudimentary but pnpm dlx docusaurus-mdx-checker
passed on the ~360 MDX files this plugin generates for our API.
diff --git a/lib/markdown/utils.js b/lib/markdown/utils.js
index 09d5baef75e5f495c19610021771094463e69ce5..19519432acbe3918dc2db90246bf184fee53f2d5 100644
--- a/lib/markdown/utils.js
+++ b/lib/markdown/utils.js
@@ -13,7 +13,7 @@ function create(tag, props) {
for (const [key, value] of Object.entries(rest)) {
propString += ` ${key}={${JSON.stringify(value)}}`;
}
- return `<${tag}${propString}>${render(children)}</${tag}>`;
+ return `\n<${tag}${propString}>${render(children)}</${tag}>\n`;
}
exports.create = create;
function guard(value, cb) {
However, the UI still crashes with Hook useDoc is called outside the <DocProvider>.
when I add docItemComponent: "@theme/ApiItem"
to my config. I believe it's due to the breaking changes related to the removal of docLayoutComponent
option and the docs theme refactoring https://docusaurus.io/docs/migration/v3#docs-theme-refactoring.
from docusaurus-openapi-docs.
I'm stuck. I was getting the same error @lucasassisrosa was getting:
For me, when running against my definition I get these errors:
Error while compiling file docs/api/role-get.api.mdx (Line=37 Column=1) Details: Expected a closing tag for `<div>` (37:440-37:445) before the end of `paragraph` --- Error while compiling file docs/api/roles-list.api.mdx (Line=37 Column=1) Details: Expected a closing tag for `<div>` (37:1035-37:1040) before the end of `paragraph` ---
But fortunately his fix worked for me (thanks @lucasassisrosa!):
When I ran into that it was due to the lack of new line chars and the presence of non-escaped characters. I did replacements following Docusaurus migration guide:
I only did the first of those fixes — I literally just replaced <
with /<
— because I'm not sure what the second link means I should do.
But now I'm getting an error I don't know how to fix:
ERROR
Objects are not valid as a React child (found: object with keys {}). If you meant to render a collection of children, use an array instead.
at throwOnInvalidObjectType (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:14888:9)
at createChild (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:15140:7)
at reconcileChildrenArray (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:15405:25)
at reconcileChildFibers (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:15822:16)
at reconcileChildren (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:19163:28)
at updateHostComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:19920:3)
at beginWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:21614:14)
at HTMLUnknownElement.callCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4165:14)
at Object.invokeGuardedCallbackDev (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4214:16)
at invokeGuardedCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4278:31)
More specifically, that first part is sometimes Objects are not valid as a React child (found: object with keys {textAlign, marginBottom})
. So it seems that code like \<div style={{"textAlign":"left","marginLeft":"1rem"}}>
is now problematic.
Does anyone know how I can fix this?
from docusaurus-openapi-docs.
I am getting the same error as @kjeom
Running these versions:
"dependencies": {
"@docusaurus/core": "^2.3.1",
"@docusaurus/preset-classic": "^2.3.1",
"@docusaurus/theme-live-codeblock": "2.3.1",
"@mdx-js/react": "^1.6.21",
"docusaurus-plugin-openapi-docs": "^2.0.2",
"docusaurus-theme-openapi-docs": "^2.0.2",
So does not seem to be only a 3.0.0 issue.
from docusaurus-openapi-docs.
For me, when running against my definition I get these errors:
Error while compiling file docs/api/role-get.api.mdx (Line=37 Column=1) Details: Expected a closing tag for `<div>` (37:440-37:445) before the end of `paragraph` --- Error while compiling file docs/api/roles-list.api.mdx (Line=37 Column=1) Details: Expected a closing tag for `<div>` (37:1035-37:1040) before the end of `paragraph` ---
When I ran into that it was due to the lack of new line chars and the presence of non-escaped characters. I did replacements following Docusaurus migration guide:
- https://docusaurus.io/docs/migration/v3#bad-usage-of--1
- https://mdxjs.com/migrating/v2/#update-mdx-files
from docusaurus-openapi-docs.
I left a comment here #660 (comment), but tldr, everything looks to be working well, except for some syntax highlighting
from docusaurus-openapi-docs.
After another inspection I noticed that this error occurs because of parameters that are in the description. We use this to, for example, show what endpoints you should use instead of an deprecated endpoint.
I believe this is another issue than is described in #663 (but I might be mistaken). Since the specifications allow you to use curly braces in summaries, descriptions and other places, I think it would be nice if these are escaped by default where possible.
from docusaurus-openapi-docs.
I found that the recent changes in v3 are causing problems in the mermaid diagrams used in the info page description.
v2 (ok):
```mermaid
graph TD
A --> B
```
v3.0.0-beta.2 (error):
```mermaid
graph TD
A --> B
```
As a temporary solution, I solved this with a custom markdownGenerators->createInfoPageMD
function (replacing >
back to >
).
Everything else works fine for me with v3.0.0-beta.2
.
from docusaurus-openapi-docs.
When I was testing with following testcases, got these errors
- dacusaurus/core:3.0.0 - docusaurus-plugin-openapi-docs:3.0.0-beta.1
- dacusaurus/core:3.0.0 - docusaurus-plugin-openapi-docs:3.0.0-beta.2
- dacusaurus/core:3.0.1 - docusaurus-plugin-openapi-docs:3.0.0-beta.1
- dacusaurus/core:3.0.1 - docusaurus-plugin-openapi-docs:3.0.0-beta.2
ERROR
could not find react-redux context value; please ensure the component is wrapped in a <Provider>
at useReduxContext (webpack-internal:///./node_modules/react-redux/es/hooks/useReduxContext.js:31:11)
at useSelector (webpack-internal:///./node_modules/react-redux/es/hooks/useSelector.js:136:28)
at MethodEndpoint (webpack-internal:///./node_modules/docusaurus-theme-openapi-docs/lib/theme/ApiExplorer/MethodEndpoint/index.js:6:932)
at renderWithHooks (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:16306:18)
at mountIndeterminateComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:20070:13)
at beginWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:21583:16)
at HTMLUnknownElement.callCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4165:14)
at Object.invokeGuardedCallbackDev (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4214:16)
at invokeGuardedCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4278:31)
at beginWork$1 (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:27447:7)
ERROR
Hook useScrollController is called outside the <ScrollControllerProvider>.
ReactContextError
at useScrollController (webpack-internal:///./node_modules/docusaurus-theme-openapi-docs/node_modules/@docusaurus/theme-common/lib/utils/scrollUtils.js:27:145)
at useScrollPositionBlocker (webpack-internal:///./node_modules/docusaurus-theme-openapi-docs/node_modules/@docusaurus/theme-common/lib/utils/scrollUtils.js:45:63)
at TabList (webpack-internal:///./node_modules/docusaurus-theme-openapi-docs/lib/theme/MimeTabs/index.js:20:339)
at renderWithHooks (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:16306:18)
at mountIndeterminateComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:20070:13)
at beginWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:21583:16)
at HTMLUnknownElement.callCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4165:14)
at Object.invokeGuardedCallbackDev (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4214:16)
at invokeGuardedCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4278:31)
at beginWork$1 (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:27447:7)
from docusaurus-openapi-docs.
- dacusaurus/core:3.0.0 - docusaurus-plugin-openapi-docs:3.0.0-beta.1
- dacusaurus/core:3.0.0 - docusaurus-plugin-openapi-docs:3.0.0-beta.2
- dacusaurus/core:3.0.1 - docusaurus-plugin-openapi-docs:3.0.0-beta.1
- dacusaurus/core:3.0.1 - docusaurus-plugin-openapi-docs:3.0.0-beta.2
As far as my testing brought me any difference in version matching between docusaurus and docusaurus-plugin-openapi-docs will cause issues with redux and hooks. I feel like this might be due to slight mismatches in dependencies, comparable to this issue.
You should be able to use the v3.0.0-beta.3 release in combination with docusaurus 3.0.1. It will not work with docusaurus 3.0.0 or any older versions.
from docusaurus-openapi-docs.
Yep, you're totally right, adding
json
andbash
fixed all the highlighting issues, can't believe I didn't think to do that 😄
I think this issue still persists with v3.0.0-beta.3, and is due to some necessary updates in the theme package. I started refactoring this package but this is a somewhat slow process...
from docusaurus-openapi-docs.
Is there anyone who have some trouble like the react-redux error?
from docusaurus-openapi-docs.
I'm also facing same issue as
[Error [ValidationError]: "docLayoutComponent" is not allowed] { _original: { sidebarPath: '/Users/<>/sidebars.js', editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', docLayoutComponent: '@theme/DocPage', docItemComponent: '@theme/ApiItem' }, details: [ { message: '"docLayoutComponent" is not allowed', path: [Array], type: 'object.unknown', context: [Object] } ] }
You should refer #654 (comment)
change the docLayoutComponent
to docRootComponent
from docusaurus-openapi-docs.
Since we are still in v2 beta yet, shall we consider making v2 release #439 compatible with docusaurus 3?
Yes please. Our team is testing docusaurus-openapi-docs
v2 beta with Docusaurus v2.4.3
and at least the mdx
files were considered valid when checking against MDX v2 (npx docusaurus-mdx-checker
). So I assume most breaking changes should be already figured out?
from docusaurus-openapi-docs.
Since we are still in v2 beta yet, shall we consider making v2 release #439 compatible with docusaurus 3?
Yes.
from docusaurus-openapi-docs.
Is this already available? I need to use a plugin that requires docusaurus v3, and need react 18.
from docusaurus-openapi-docs.
@jasikpark Well, if you use OpenAPI >= 3.1.0 , you can use my plugin as starting this version, OpenAPI is fully compatible with JSON Schema
from docusaurus-openapi-docs.
Thank you for the suggestion, but I'm looking to keep the same plugin for the UI and design choices we've made, and because this OpenAPI plugin has purpose built components for showing api definitions. I'm more interested in teaching my users about how to use the API than being specific about the shape of the spec, it's just a nice way to format the documentation.
from docusaurus-openapi-docs.
at least the
mdx
files were considered valid when checking against MDX v2 (npx docusaurus-mdx-checker
). So I assume most breaking changes should be already figured out?
For me, when running against my definition I get these errors:
Error while compiling file docs/api/role-get.api.mdx (Line=37 Column=1)
Details: Expected a closing tag for `<div>` (37:440-37:445) before the end of `paragraph`
---
Error while compiling file docs/api/roles-list.api.mdx (Line=37 Column=1)
Details: Expected a closing tag for `<div>` (37:1035-37:1040) before the end of `paragraph`
---
<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><strong>Query Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"includeCounts","in":"query","description":"If true, return count of total records and current page start and count in metadata","required":false,"schema":{"type":"boolean","default":false}}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"name":"cursor","in":"query","description":"Cursor value at which to start the results, provided in `nextCursor` or `prevCursor` of a prior request","example":"bmV4dA.eyJsb2dzLmNyZQ5iIiwiX3ZhbHVlIjo9In19","schema":{"type":"string"}}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"name":"pageSize","in":"query","description":"Number of records to return in each page","required":false,"schema":{"type":"integer","default":25,"maximum":500}}}></ParamsItem></ul></div></details><div><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
Not sure exactly what the issue is..
https://mdxjs.com/playground/:
![image](https://private-user-images.githubusercontent.com/10626596/280380765-478f4293-34c8-4705-bb3e-e61ffae0843c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDYzNzYzODcsIm5iZiI6MTcwNjM3NjA4NywicGF0aCI6Ii8xMDYyNjU5Ni8yODAzODA3NjUtNDc4ZjQyOTMtMzRjOC00NzA1LWJiM2UtZTYxZmZhZTA4NDNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTI3VDE3MjEyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVmOWUzOGNhOWU2MGUyNjk3NjJlMzYxZDgzMGM3NzgwYzk5Y2E1YjMxOGU5MTBkYjUwOGQzNmNhY2E4NTJjODcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.VV5zcFVRkqZ15JdU04jrXxfabvlKGGEIQvbtdVYNbtQ)
from docusaurus-openapi-docs.
Thanks @jcwillox, have you seen the changes proposed in #648?
from docusaurus-openapi-docs.
Anyone have a chance to try 3.0.0-beta.1
?
from docusaurus-openapi-docs.
After some more testing I ran into an issue with path parameters.
Looking at the Swagger specifications for describing parameters, each parameter is denoted with curly braces. In MDX3 these parameters will be considered to be expressions (see the Docusaurus migration guide for this common issue as well).
Thus, for endpoints with path parameters (in this specific case {type}
), you will get the following error:
from docusaurus-openapi-docs.
After some more testing I ran into an issue with path parameters.
I believe this issue was addressed in v2 #663 and will be ported to v3 soon.
from docusaurus-openapi-docs.
@sserrata I tested out 3.0.0-beta.1 and mostly everything looks good, thank you! The mdx files all compile and pass npx docusaurus-mdx-checker
properly. But when I actually run the code and try to load one of the OpenAPI-to-Docusaurus pages locally, I get this error, despite all components having children components:
Docusaurus error: the <Tabs> component requires at least one <TabItem> children component
I get this error when there are multiple <TabItem>
components under <ApiTabs>
.
from docusaurus-openapi-docs.
3.0.0-beta.1
works for me with Docusaurus3.0.1
, except for the highlighting as @jcwillox noted. For my documentation I also noticed that I had to addjson
andbash
toadditionalLanguages
to fix the highlighting for these, while this was not needed for previous Docusaurus versions.
Yep, you're totally right, adding json
and bash
fixed all the highlighting issues, can't believe I didn't think to do that 😄
from docusaurus-openapi-docs.
- dacusaurus/core:3.0.0 - docusaurus-plugin-openapi-docs:3.0.0-beta.1
- dacusaurus/core:3.0.0 - docusaurus-plugin-openapi-docs:3.0.0-beta.2
- dacusaurus/core:3.0.1 - docusaurus-plugin-openapi-docs:3.0.0-beta.1
- dacusaurus/core:3.0.1 - docusaurus-plugin-openapi-docs:3.0.0-beta.2
As far as my testing brought me any difference in version matching between docusaurus and docusaurus-plugin-openapi-docs will cause issues with redux and hooks. I feel like this might be due to slight mismatches in dependencies, comparable to this issue.
You should be able to use the v3.0.0-beta.3 release in combination with docusaurus 3.0.1. It will not work with docusaurus 3.0.0 or any older versions.
Thanks for the response. But the issue is still in the combination (v3.0.1 - v3.0.0-beta.3)
from docusaurus-openapi-docs.
Hello! Adding docusaurus-theme-openapi-docs@^2.0.2
to my project introduces a dependency to "@docusaurus/theme-common" ">=2.4.1 <=2.4.3"
. Can we bump this dependency to ^3.0.0?
from docusaurus-openapi-docs.
@Gijsdeman The regex for matching curly braces would probably need a little tweaking.
Right now, if there are two pairs of curly braces on a single line, for example:
{key, value} {key, value}
The regex would match them as a single pair of brackets and only escape the first and the last one.
from docusaurus-openapi-docs.
The regex would match them as a single pair of brackets and only escape the first and the last one.
Good catch, I did not take greedy matching into account. I also realized I could just escape all curly brackets instead of just the ones that surround text, thus I opted for that approach.
from docusaurus-openapi-docs.
Is there anyone who have some trouble like the react-redux error?
Have you tried deleting your yarn.lock
and all node modules and reinstalled everything (with aligned versions of docusaurus-*-openapi-docs
and docusaurus
)? I only had this error due to version mismatches, but a fresh install of all packages always fixed the issue for me.
from docusaurus-openapi-docs.
Is there anyone who have some trouble like the react-redux error?
Have you tried deleting your
yarn.lock
and all node modules and reinstalled everything (with aligned versions ofdocusaurus-*-openapi-docs
anddocusaurus
)? I only had this error due to version mismatches, but a fresh install of all packages always fixed the issue for me.
for me it does not help
package.json
"@docusaurus/core": "3.0.1",
"@docusaurus/plugin-google-gtag": "^3.0.1",
"@docusaurus/preset-classic": "3.0.1",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"docusaurus-plugin-openapi-docs": "^3.0.0-beta.3",
"docusaurus-theme-openapi-docs": "^3.0.0-beta.3",
"prism-react-renderer": "^2.3.0",
"prismjs": "^1.29.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
still have the error:
ERROR
could not find react-redux context value; please ensure the component is wrapped in a <Provider>
~
from docusaurus-openapi-docs.
Is there anyone who have some trouble like the react-redux error?
Have you tried deleting your
yarn.lock
and all node modules and reinstalled everything (with aligned versions ofdocusaurus-*-openapi-docs
anddocusaurus
)? I only had this error due to version mismatches, but a fresh install of all packages always fixed the issue for me.
Sure, I have deleted and reinstalled all the things with "@docusaurus/core": "3.0.1" and "docusaurus-plugin-openapi-docs": "^3.0.0-beta.3". But it doesn't work with same react-redux error
from docusaurus-openapi-docs.
I have also checked it working well
- "@docusaurus/core": "3.1.0",
- "@docusaurus/preset-classic": "3.1.0",
- "docusaurus-plugin-openapi-docs": "3.0.0-beta.4",
- "docusaurus-theme-openapi-docs": "3.0.0-beta.4",
from docusaurus-openapi-docs.
Hello i m still facing the issue, with those versions.
from docusaurus-openapi-docs.
I'm also facing same issue as
[Error [ValidationError]: "docLayoutComponent" is not allowed] { _original: { sidebarPath: '/Users/<>/sidebars.js', editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', docLayoutComponent: '@theme/DocPage', docItemComponent: '@theme/ApiItem' }, details: [ { message: '"docLayoutComponent" is not allowed', path: [Array], type: 'object.unknown', context: [Object] } ] }
from docusaurus-openapi-docs.
I have also checked it working well
- "@docusaurus/core": "3.1.0",
- "@docusaurus/preset-classic": "3.1.0",
- "docusaurus-plugin-openapi-docs": "3.0.0-beta.4",
- "docusaurus-theme-openapi-docs": "3.0.0-beta.4",
I'm still hitting the Cause: Expected a closing tag for '<div>' (31:488-31:544) before the end of 'paragraph'
with these versions using the openapi-docs example with petstore.yaml.
from docusaurus-openapi-docs.
I have also checked it working well
- "@docusaurus/core": "3.1.0",
- "@docusaurus/preset-classic": "3.1.0",
- "docusaurus-plugin-openapi-docs": "3.0.0-beta.4",
- "docusaurus-theme-openapi-docs": "3.0.0-beta.4",
I'm still hitting the
Cause: Expected a closing tag for '<div>' (31:488-31:544) before the end of 'paragraph'
with these versions using the openapi-docs example with petstore.yaml.
Try to cleanup the generated api docs and run. Also check that " themes: ["docusaurus-theme-openapi-docs"], "
is on config.js
from docusaurus-openapi-docs.
I'm also facing same issue as
[Error [ValidationError]: "docLayoutComponent" is not allowed] { _original: { sidebarPath: '/Users/<>/sidebars.js', editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', docLayoutComponent: '@theme/DocPage', docItemComponent: '@theme/ApiItem' }, details: [ { message: '"docLayoutComponent" is not allowed', path: [Array], type: 'object.unknown', context: [Object] } ] }
You should refer #654 (comment)
change the
docLayoutComponent
todocRootComponent
Thank you this is working now
from docusaurus-openapi-docs.
I have also checked it working well
- "@docusaurus/core": "3.1.0",
- "@docusaurus/preset-classic": "3.1.0",
- "docusaurus-plugin-openapi-docs": "3.0.0-beta.4",
- "docusaurus-theme-openapi-docs": "3.0.0-beta.4",
I'm still hitting the
Cause: Expected a closing tag for '<div>' (31:488-31:544) before the end of 'paragraph'
with these versions using the openapi-docs example with petstore.yaml.Try to cleanup the generated api docs and run. Also check that
" themes: ["docusaurus-theme-openapi-docs"], "
is on config.js
Is there a recommended way to do that? I can go through and remove the accidental newlines in the generated mdx files manually, but it would take ages on the petstore example to do by hand. I've got " themes: ["docusaurus-theme-openapi-docs"], "
in my config already.
from docusaurus-openapi-docs.
Related Issues (20)
- Missing boundary in Content-Type when multipart/form-data HOT 7
- Module not found: Error: Can't resolve 'react/jsx-runtime' HOT 1
- Uncaught runtime errors: Hook useDoc is called outside the <DocProvider>. HOT 3
- sass-loader module not found with v2.0.0-beta.4 HOT 2
- Improvements to webhook page layout HOT 2
- Our project is broken after ApiDemoPanel rename HOT 1
- `readOnly` and `writeOnly` properties wrong logic in Request and Response HOT 3
- Error: => Bad Docusaurus theme value themes[0] HOT 1
- Authorization Section missing from right sidebar
- ^1.7.0 version stopped rendering Language tabs texts in API documentation HOT 1
- Allow the option to use ES5 in sidebar.js autogeneration in 3.0.0 HOT 1
- Code being generated for NodeJS is too old and not correct HOT 2
- Frontmatter api prop compression is nondeterministic HOT 1
- API plugin isn't working with the file upload HOT 2
- Schema details not shown with `oneOf` for primitive types
- Error when generating API docs - "Error: No resolver found for key if"
- Version label has extra margin padding
- Support for custom code samples via `x-codeSamples`
- List Data Models
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docusaurus-openapi-docs.