Comments (15)
Hi @rohit-gohri
There's a plugin for ReDoc to do this: https://github.com/wll8/redoc-try
Maybe it will work well and just need some styling.
I'm also interested on this.
from redocusaurus.
Not sure what you are talking about, could you add an example?
from redocusaurus.
Hi, Rohit,
What I mean is like the swagger ui, we have a "Try it out" button.
Another question, is it possible to have the openapi.yaml in another folder, i.e. apis to handle multiple openapi files.
Btw, I love what you have done. Great work.
from redocusaurus.
Another issue, when i change the routePath to something other than api, i.e./api/petstore, i got another issue:
Error: end of the stream or a document separator is expected in "http://localhost:3000/api/openapi.yaml" at line 35, column 47:
at BaseResolver.parseDocument (webpack-internal:///./node_modules/@redocly/openapi-core/lib/resolve.js:122:19)
at eval (webpack-internal:///./node_modules/@redocly/openapi-core/lib/resolve.js:133:29)
from redocusaurus.
Hi, Rohit,
What I mean is like the swagger ui, we have a "Try it out" button.
So this plugin is a wrapper around https://github.com/redocly/redoc to make it easy to use with docusaurus, so a feature like that will be out of scope for the purpose of this plugin.
They already have an open issue for this: Redocly/redoc#53
from redocusaurus.
Another question, is it possible to have the openapi.yaml in another folder, i.e. apis to handle multiple openapi files.
Not sure what you mean. Some thing like #23 ?
Btw, I love what you have done. Great work.
Thanks! :D
from redocusaurus.
Closing this, since the original request is out of scope for this project. Hopefully redoc will implement it.
Please open a new issue for any other issues
from redocusaurus.
@Anthony-Gaudino Styling wll8/redoc-try to also support docusaurus themes is going to be a lot of work. I think a better alternative is to use code examples (curl is one) instead that make it easy to try the API in your local, and they are already supported by redoc.
from redocusaurus.
I think a better alternative is to use code examples
Could you please instruct me to enable the code examples? I tried what the doc says but not working:
theme: {
options:
{
// https://redocly.com/docs/api-reference-docs/configuration/functionality/
generateCodeSamples: {
languages: [
{ lang: "curl" },
{ lang: "Node.js" },
{ lang: "JavaScript", label: "JS" },
],
},
},
},
Thank you in advance.
from redocusaurus.
Hey @Songkeys, that feature is part of redocly's paid offerings. From their docs (https://redocly.com/docs/api-reference-docs/guides/generate-code-samples/) :
warning
Auto-generated code samples are not available in Redoc (the "community edition").
from redocusaurus.
@rohit-drone
Oh. Btw, is redocusaurus
compatible with the paid service? (I see I need to configure a licenseKey
to enable this?) If so, I will a deep look at their paid service.
from redocusaurus.
I'm not sure, haven't used it. We use the official package behind the scenes: https://github.com/Redocly/redoc/
If that can be configured with licenseKey
then so should redocusaurus
Btw, they also have a "Try it API console": https://redocly.com/docs/api-reference-docs/guides/try-it-console/
from redocusaurus.
I'll take a look. Thank you so much for this info and this amazing project!
from redocusaurus.
Hey @Songkeys, that feature is part of redocly's paid offerings. From their docs (https://redocly.com/docs/api-reference-docs/guides/generate-code-samples/) :
How much of a pain would it be to remake it 🤔
from redocusaurus.
How much of a pain would it be to remake it 🤔
Not in scope of this package. This package's aim is just to provide an integration, not to remake redoc.
from redocusaurus.
Related Issues (20)
- Extend deploy script to sign git commits. HOT 1
- [ERROR] TypeError: Cannot set properties of undefined (setting 'minItems') HOT 9
- CSS broken HOT 1
- Callbacks lack proper background in dark mode HOT 1
- Is there a way to run the APIs through the redoc component ? HOT 1
- Support for Docusaurus 3.0 HOT 9
- Example not hidden for schema imports
- Redocusaurus should collect heading ids / anchors HOT 2
- Webpack missing in Peer Dependencies HOT 1
- Error: Docusaurus server-side rendering could not render static page with path /api/ because of error: slugify: string argument expected HOT 2
- Issue with calling useColorMode outside the ColorModeProvider for Docusaurus 3.0.1 HOT 5
- Logo from spec (x-logo) not being rendered. HOT 3
- Add warning for deprecated options and remove them in next breaking version
- Generate code samples
- Support versioning API along with docs HOT 1
- API Reference page on mobile device HOT 2
- Footer UI defect
- Sidebar scrolls under navbar on direct visit HOT 2
- Standalone redoc plugin HOT 3
- Sidebar scroll not working properly with offset
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 redocusaurus.