Comments (18)
Either a dropdown or a line bar with all microservice API next to each other
from redocusaurus.
Have there been any progress on this? Looking to document 8 different microservices each with their own endpoint.
from redocusaurus.
Really nice example I like that. The way I had it working right now was:
- Create a file with x-tagGroups and then (https://redoc.ly/docs/api-reference-docs/specification-extensions/x-tag-groups/)
- Merge all files with https://www.npmjs.com/package/openapi-merge
But I like your example solution more. Will do that instead
from redocusaurus.
Your solution does not fit on my layout. I have already too much content on the navbar...
Will try to develop something appropriate when I get some spare time. (with versionning, which matters for us)
from redocusaurus.
I've created a new React component that I use to display the documentation with double sidebars :
Ok, on small screens it would be hard to use. Maybe I can tweak the theme, when #129 is deployed, to make it more attractive, as the center does not have much space on 22" screens.
As I'm using mdx file to run redoc and not the specs
parameter inside docusaurus.config.js
file, my API is versionned 🎉 .
from redocusaurus.
This was done thanks to the ideas from the community! Pretty cool to see all the different usages in the wild.
Thanks to @serut for the initial request and work. And this MDX example with existing components by @TheCatLady here: https://github.com/someengineering/resoto.com/blob/7494b135d87533e54372e2f632f570dab3d06d6d/docs/reference/api.md
from redocusaurus.
This seems like it would be difficult (or impossible to do). As the API docs are rendered as a single React component. We don't have the content of the sidebar to integrate with the Docusaurus sidebar.
You could create your own React component that wraps the @theme/Redoc
component and add custom header navigation elements maybe? I think it will be difficult to merge complex sidebars
from redocusaurus.
If you want to version your API then just have multiple YAML files, each for each version of your API
from redocusaurus.
I have no idea how React component are rendered by docusaurus.
Maybe the page itself should have everything related to redoc so it renders the sidebar then as the main content it renders the redoc in the center of the page. Currently from the docusaurus.config.js
file it's pretty impossible to do it
Yes, for versonned API I think the "fake page" is good enough, but I didn't try it
from redocusaurus.
Maybe the page itself should have everything related to redoc so it renders the sidebar then as the main content it renders the redoc in the center of the page. Currently from the docusaurus.config.js file it's pretty impossible to do it
I don't think that would look good, but I'll keep the issue open if anyone wants to give this a try or to see if there is demand for this.
from redocusaurus.
How would you display 10 microservices API, if you don't have a sidebar ?
If there is another way, I'm open to that. :)
from redocusaurus.
How would you display 10 microservices API, if you don't have a sidebar ?
Sidebar is a good idea, but not a nested sidebar because redoc would have it's own sidebar. Maybe a dropdown would look better, below the header?
from redocusaurus.
How about just adding a dropdown to the navbar (navbar-dropdowns) and grouping all the docs there?
See example I just added :
redocusaurus/website/docusaurus.config.js
Lines 81 to 106 in 62e30bb
from redocusaurus.
As I'm using mdx file to run redoc and not the specs parameter inside docusaurus.config.js file, my API is versionned 🎉 .
That is genius!! 🎉
Ok, on small screens it would be hard to use.
You can modify the breakpoints in the theme to keep the view always single pane? That sounds like a good compromise
from redocusaurus.
That is genius!! 🎉
Thanks !
You can modify the breakpoints in the theme to keep the view always single pane?
Which property are you talking about ?
I'm going to make two more PR : the component that I use to make it possible, as it can be stored on your theme package https://github.com/RegardsOss/RegardsOss.github.io/blob/master/src/redoc/RegardsApiDoc.jsx
And add https://github.com/RegardsOss/RegardsOss.github.io as user of your lib
from redocusaurus.
You can modify the breakpoints in the theme to keep the view always single pane?
Which property are you talking about ?
https://github.com/Redocly/redoc#redoc-theme-object -> breakpoints
breakpoints
# breakpoints for switching three/two and mobile view layoutssmall: '50rem'
medium: '85rem'
large: '105rem'
We can force the 2 pane view with this I think (moves examples/code-samples below schema).
And add RegardsOss/RegardsOss.github.io as user of your lib
Would be great!
from redocusaurus.
We can force the 2 pane view with this I think (moves examples/code-samples below schema).
It works great ! Thanks
from redocusaurus.
This is now possible to do with a new ApiDocMdx
component in v1.1.0. See the guide here: https://redocusaurus.vercel.app/docs/guides/multiple-apis
And example here: https://redocusaurus.vercel.app/docs/nested/nested-1
from redocusaurus.
Related Issues (20)
- Theme options doesnt works with docusaurus 2.2.0 HOT 1
- Cannot mix different versions of joi schemas HOT 4
- Can't retrieve spec from a private Nexus repository HOT 7
- Generated link allowing to download OpenAPI specification uses 'plugin-redoc-0.yaml' as name of the file instead of the original name HOT 1
- Remove the Response Schema without removing the Response sample on the right side HOT 1
- How to specify spec file by relative url HOT 5
- Using / for API reference HOT 6
- Footer UI defects on Redoc sidebar HOT 9
- "Page not found" shows when loading operationId URL HOT 5
- Support for i18n HOT 6
- Hiding footer not working HOT 1
- v1.6.1 Compresses Mobile View HOT 3
- docusaurus and redocusaurus version compatibility HOT 2
- Use in docker HOT 1
- Rendering Definitions in Redoc using swagger docs HOT 1
- Render mermaid embedded within swagger/openapi
- Error: "presets[0]" does not match any of the allowed types HOT 2
- Webpack "Failed to fetch" issue HOT 8
- Memory regeneration problem when generating with cyclic dependencies HOT 6
- Extend deploy script to sign git commits. HOT 1
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.