8000 feat(api-reference): add callbacks by amritk · Pull Request #5716 · scalar/scalar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(api-reference): add callbacks #5716

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

Merged
merged 16 commits into from
May 23, 2025
Merged

feat(api-reference): add callbacks #5716

merged 16 commits into from
May 23, 2025

Conversation

amritk
Copy link
Member
@amritk amritk commented May 22, 2025

Problem

Currently, we don't support callbacks

Solution

With this PR we show callbacks! I didn't want to go too deep with this one since its going to change with the new store, will clean up the code and types then.

image

  • gotta remove the example spec code before merging

Checklist

I’ve gone through the following:

  • I’ve added an explanation why this change is needed.
  • I’ve added a changeset (pnpm changeset).
  • I’ve added tests for the regression or new feature.
  • I’ve updated the documentation.

@amritk amritk requested a review from hanspagel as a code owner May 22, 2025 19:08
Copy link
changeset-bot bot commented May 22, 2025

🦋 Changeset detected

Latest commit: 24d8797

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

This PR includes changesets to release 17 packages
Name Type
@scalar/api-reference Patch
@scalar/oas-utils Patch
@scalar/galaxy Patch
@scalar/aspnetcore Patch
@scalar/fastify-api-reference Patch
@scalar/nuxt Patch
@scalar/api-reference-react Patch
@scalar/api-client Patch
@scalar/components Patch
@scalar/import Patch
@scalar/mock-server Patch
@scalar/openapi-to-markdown Patch
@scalar/postman-to-openapi Patch
@scalar/scripts Patch
@scalar/api-client-react Patch
scalar-app Patch
@scalar/use-codemirror Patch

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

],
persistAuth: true,
// Avoid CORS issues
title: 'Scalar Galaxy', // optional, would fallback to 'API #1'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this before merging

Copy link
relativeci bot commented May 22, 2025

#10014 Bundle Size — 2.43MiB (+0.14%).

24d8797(current) vs edb5490 main#10009(baseline)

Warning

Bundle contains 3 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#10014
     Baseline
#10009
Regression  Initial JS 2.43MiB(+0.14%) 2.42MiB
No change  Initial CSS 0B 0B
No change  Cache Invalidation 100% 100%
No change  Chunks 1 1
No change  Assets 1 1
Change  Modules 1499(+0.4%) 1493
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 168 168
No change  Duplicate Packages 3 3
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#10014
     Baseline
#10009
Regression  JS 2.43MiB (+0.14%) 2.42MiB

Bundle analysis reportBranch amrit/webhooks-callbacksProject dashboard


Generated by RelativeCIDocumentationReport issue

@@ -102,6 +102,8 @@ export const oasRequestSchema = z.object({
'deprecated': z.boolean().optional(),
/** Response formats */
'responses': z.record(z.string(), z.any()).optional(),
/** Callbacks */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

temp 🥴

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"temp" 😁

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha u know this one is temp for real

Copy link
Contributor
github-actions bot commented May 22, 2025

Copy link
Member
@hanspagel hanspagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GREAT WORK

just design-wise @cameronrohani: isn’t that too big of a wall of information? it might not be super clear which example response is for the callback and which for the operation. shouldn’t we make callbacks kind of a new block inside but below the operation somehow?

Screenshot 2025-05-23 at 15 09 00

@amritk amritk requested a review from cameronrohani May 23, 2025 16:28
@amritk amritk force-pushed the amrit/webhooks-callbacks branch from 5813337 to 4d263d5 Compare May 23, 2025 17:20
@amritk amritk force-pushed the amrit/webhooks-callbacks branch from 4d263d5 to 9a25213 Compare May 23, 2025 19:34
Copy link
Contributor
@cameronrohani cameronrohani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay send it

@marclave marclave merged commit 442c0a3 into main May 23, 2025
32 checks passed
@marclave marclave deleted the amrit/webhooks-callbacks branch May 23, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0