Comments (6)
This will be upcoming in the v1 release. It uses the official redoc openapi-cli under the hood, to maximise compatibility. Also, the bundled yaml will automatically be added as a static asset and used as download url 😄
from redocusaurus.
A good bundler is the npm openapi tool itself @openapitools/openapi-generator-cli
, which you can invoke from a package.json command like
"schema:copy": "openapi-generator-cli generate -i ../api-spec/schema/yourschema.yaml -g openapi-yaml -o ./static"
Very poorly documented feature, that generator is listed under "documentation generators" 🙄 It cant also output json if you use openapi
instead of openapi-yaml
and it can take json as well.
Still, its a workaround.
from redocusaurus.
Added in the latest beta! It'll be great if you can test it out and give some feedback : #146
Example added here: https://github.com/rohit-gohri/redocusaurus/blob/releases/v1/website/docusaurus.config.js#L19-L24
YAMLs here: https://github.com/rohit-gohri/redocusaurus/tree/releases/v1/website/openapi/multi-yaml
from redocusaurus.
Hello! First of all I would like to thank you for the great contributions you make to the project. I'm recently using Docusaurus, and your documentation helped me a lot.
But I have some doubts, which I hope you can help me solve.
-
Is there a way to remove the button so that they can download the services file that I refer to from my website?
-
Is there a way to group all my remote .yaml files in a side menu, like the one for documents?
That is to say, that in the upper tabs, there is only one item and when clicking on it, the side menu opens with the different
documentations. (as the documents section does)
Again, thank you very much for your great contributions on this topic, greetings.
from redocusaurus.
I agree that breaking up specs into multiple files makes for a much better workflow. I think this is possible when generating docs with the redoc cli but not with redocusaurus currently. Even I was using https://github.com/Redocly/openapi-cli to bundle my files into a single yaml.
I think this is a valid use case and would like to add it to the project, but I can't be certain when I would get time.
If you want to give it a try, feel free to do so and open a PR.
We would have to add https://github.com/Redocly/openapi-cli/tree/master/packages/core#bundle here:
redocusaurus/packages/docusaurus-plugin-redoc/src/index.ts
Lines 35 to 38 in 783d464
from redocusaurus.
Hey @EdgarRuizUribe! Happy to help, but best to create a new issue or discussion in the future for questions.
Is there a way to remove the button so that they can download the services file that I refer to from my website?
redoc
has an option to hideDownloadButton
that you can pass to it by setting it in config:
module.exports = {
// ...
presets: [
[
'redocusaurus',
{
// Plugin Options for loading OpenAPI files
specs: [
{
spec: 'openapi/openapi.yaml',
route: '/api/',
},
],
// Theme Options for modifying how redoc renders them
theme: {
primaryColor: '#1890ff',
options: {
// this is what needs to be set:
hideDownloadButton: true,
},
},
},
],
],
// ...
};
Is there a way to group all my remote .yaml files in a side menu, like the one for documents?
That is currently not supported, there is some discussion with different approaches in this issue : #108 . One way is to use MDX files to render nested sidebars. Best to use that issue for further discussions related to this.
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.