-
Notifications
You must be signed in to change notification settings - Fork 289
feat: Add schema tab in Request and Response #1164
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
Conversation
Visit the preview URL for this PR (updated for commit 8ec03dc):
https://docusaurus-openapi-36b86--pr1164-kv9npimt.web.app
(expires 2025年7月26日 17:23:49 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
Sign: bf293780ee827f578864d92193b8c2866acd459f
Hi @dsuket, I'm not opposed to exposing request samples/example schemas, but I do wonder if it duplicates the samples we already include in the "API Explorer" panel. I also wonder about the UX noise it may introduce, especially without a direct way to enable/disable the samples. Interested in your thoughts here.
@sserrata Sorry for the late reply.
Is what you refer to as the "API Explorer" panel the REQUEST panel in the bottom right?
before-2
If so, then it is indeed displayed correctly for Media type examples.
However, for schema examples, it is not displayed correctly as shown below.
before-3
Therefore, I made it display in tabs for the Request, similar to the Response, as shown below.
after
Additionally, I believe that having the Request and Response displayed consistently makes it easier to recognize. In fact, I didn't notice the REQUEST panel in the bottom right until you pointed it out. 😅
Uh oh!
There was an error while loading. Please reload this page.
Description
Ensure that examples are displayed correctly when there are examples in the Media Type and Schema in the Request body and Response.
Motivation and Context
To address Issue #1158, I need to organize the example-related parts.
This is the 3rd step toward that goal.
Please see below first.
How Has This Been Tested?
npm run buildnpm run testScreenshots (if appropriate)
example of schema in requestBody
スクリーンショット 2025年06月11日 18 36 50
スクリーンショット 2025年06月11日 18 36 55
examples of schema in requestBody
スクリーンショット 2025年06月11日 18 37 00
スクリーンショット 2025年06月11日 18 37 06
example of schema in response
スクリーンショット 2025年06月11日 18 37 35
スクリーンショット 2025年06月11日 18 37 41
examples of schema in response
スクリーンショット 2025年06月11日 18 37 47
スクリーンショット 2025年06月11日 18 37 52
Types of changes
Checklist