-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't get this to work, got error #18
Comments
Hi @dietergeerts , I tried to serve the official "pet store" spec from https://petstore.swagger.io/v2/swagger.json without any issue. To analyze your issue, I need you provide:
About OpenAPI 3.1 support, I confirm you that Redoc support OpenAPI 3.1 (basic) cf. https://github.com/Redocly/redoc Regards, |
I used the petstore one, both v2 and v3, to make sure the setup works first before trying our own.
{
"specs": [
{
"file": "./petstore.json",
"context": {
"version": "2.0",
"public": "true"
}
}
]
}
But like mentioned I had to remove several peer dependencies due to errors when installing with pnpm. Now this file just removes the listing from the package file, so we don't get the errors, but they do point out that there is something wrong with the setup, and that the used packages are incompatible, and maybe in one of these is the reason of this bug? module.exports = {
hooks: {
readPackage(pkg, context) {
if (pkg.name === 'ajv-oai') {
context.log('Remove peer on ajv from ajv-oai');
delete pkg.peerDependencies['ajv'];
}
if (pkg.name === 'mobx-react-lite') {
context.log('Remove peer on mobx from mobx-react-lite');
delete pkg.peerDependencies['mobx'];
}
if (pkg.name === 'mobx-react') {
context.log('Remove peer on mobx from mobx-react');
delete pkg.peerDependencies['mobx'];
}
if (pkg.name === 'redoc') {
context.log('Remove peer on core-js from redoc');
delete pkg.peerDependencies['core-js'];
context.log('Remove peer on mobx from redoc');
delete pkg.peerDependencies['mobx'];
context.log('Remove peer on styled-components from redoc');
delete pkg.peerDependencies['styled-components'];
}
return pkg;
}
}
} |
Hi @dietergeerts , Thanks for your feedback. I tried to reproduce your issue by using your configuration file, but I can't do it. All works like a charm ;) I think your main problem is that you removed some peer dependencies... When you install This warning messages are due to another dependencies:
Without these, I had to find some workarounds... Regards, |
While evaluating tools for our API documentation and creation process, I tried this with our current swagger file, and can't get the
serve
to work. Then I tried with the official "pet store" spec, and that doesn't work either. I got the following error:I was hoping to get this to work easily, but that doesn't seem to be the case, so I'm very hesitant to dive deeper into this tool(s) in order to see if we can use them. The thing is that a lot of peer dependencies are wrong, or are not correctly used, and with our rush/pnpm setup, they are checked, and thus I had to add lots of exclusions to install this package to begin with, which doesn't seem good Imho.
Another strange thing is that redoc doesn't support OpenAPI 3.1 yet, and is used here, while this project claims this support?
Some help is appreciated to further validate the usage of this tool.
The text was updated successfully, but these errors were encountered: