fuma-nama / fumadocs

The beautiful docs framework with Next.js. Alternative to Nextra
https://fumadocs.vercel.app
MIT License
1.92k stars 116 forks source link

Feat/openapi server select #1046

Closed sheen4n closed 2 weeks ago

sheen4n commented 2 weeks ago

Aims to resolve #783

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: 5bfc91628eed3cea1b4b9f87a3542f10065139d1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------- | ----- | | fumadocs-openapi | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 2 weeks ago

@sheen4n is attempting to deploy a commit to the Fuma Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fumadocs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 3:32am
sheen4n commented 2 weeks ago

Hi @Mahmoudgalalz and @fuma-nama , I have made a PR for this feature, please help to take a look :)

For issue https://github.com/fuma-nama/fumadocs/issues/783

image

Pressing send will direct the request to different servers

image image

As for the code examples on the right, I did not update it because the change is pretty complicated as the server side component cannot leverage on useApiContext() to get the current baseUrl selected. If convert to client side component, it will not have access to 'fs'. (Feel free to add on or give review :) )

fuma-nama commented 2 weeks ago

Looks good, will improve the UI later

sheen4n commented 2 weeks ago

Thanks @fuma-nama for your review and merge!