8000 chore(openapi-parser): deprecate pipeline syntax by hanspagel · Pull Request #5658 · scalar/scalar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore(openapi-parser): deprecate pipeline syntax #5658

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 4 commits into from
May 16, 2025

Conversation

hanspagel
Copy link
Member

Problem

In the README, we promote a pipeline syntax for the parser:

import { openapi } from '@scalar/openapi-parser'

const specification = 

// New pipeline …
const result = openapi()
  // loads the specification …
  .load(specification)
  // upgrades to OpenAPI 3.1 …
  .upgrade()
  // removes all internal operations …
  .filter((schema) => !schema?.['x-internal'])
  // done!
  .get()

But this adds a lot of complexity to the code base, and it hindered me a few times to change the utilities.

Solution

I’d like to get rid of it. People can just use the individual utilities. With this PR we’re marking it as @deprecated and removing it from the README.

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.

@hanspagel hanspagel self-assigned this May 15, 2025
Copy link
changeset-bot bot commented May 15, 2025

🦋 Changeset detected

Latest commit: a3d2cab

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

This PR includes changesets to release 12 packages
Name Type
@scalar/openapi-parser Patch
@scalar/fastify-api-reference Patch
@scalar/api-client Patch
@scalar/api-reference Patch
@scalar/import Patch
@scalar/mock-server Patch
@scalar/openapi-to-markdown Patch
@scalar/nuxt Patch
@scalar/api-client-react Patch
scalar-app Patch
@scalar/aspnetcore Patch
@scalar/api-reference-react 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

Copy link
relativeci bot commented May 15, 2025

#9818 Bundle Size — 2.45MiB (0%).

a3d2cab(current) vs 40bad87 main#9816(baseline)

Warning

Bundle contains 6 duplicate packages – View duplicate packages

Bundle metrics  no changes
                 Current
#9818
     Baseline
#9816
No change  Initial JS 2.45MiB 2.45MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 0% 100%
No change  Chunks 1 1
No change  Assets 1 1
No change  Modules 1487 1487
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 172 172
No change  Duplicate Packages 6 6
Bundle size by type  no changes
                 Current
#9818
     Baseline
#9816
No change  JS 2.45MiB 2.45MiB

Bundle analysis reportBranch chore/deprecate-pipeline-syntaxProject dashboard


Generated by RelativeCIDocumentationReport issue

Copy link
Contributor

Copy link
Member
@amritk amritk left a comment

Choose a reason for hiding this comment

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

+1 for functional!

@hanspagel hanspagel merged commit bd602d3 into main May 16, 2025
33 checks passed
@hanspagel hanspagel deleted the chore/deprecate-pipeline-syntax branch May 16, 2025 09:00
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.

2 participants
0