Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

feat(openapi-parser): expose more types under the OpenAPI namespace #162

Merged
merged 3 commits into from
Jul 23, 2024

Conversation

hanspagel
Copy link
Member

@hanspagel hanspagel commented Jul 23, 2024

I find myself often using something like

  path?:
    | OpenAPIV2.PathItemObject
    | OpenAPIV3.PathItemObject
    | OpenAPIV3_1.PathItemObject

But some types were already exposed under the OpenAPI namespace, e. g. OpenAPI.Operation. This PR exposes more types, not all but the ones I find myself working with a lot. Allows to just do this:

  path?: OpenAPI.PathItemObject

Which should also make it easier to add OpenAPI 3.2/4.0 at some point.

Copy link

changeset-bot bot commented Jul 23, 2024

🦋 Changeset detected

Latest commit: e5b68e2

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

This PR includes changesets to release 1 package
Name Type
@scalar/openapi-parser 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

@hanspagel hanspagel requested a review from marclave July 23, 2024 09:18
@hanspagel hanspagel changed the title feat: expose more types under the OpenAPI namespace feat(openapi-parser): expose more types under the OpenAPI namespace Jul 23, 2024
Copy link

relativeci bot commented Jul 23, 2024

#128 Bundle Size — 74.91KiB (0%).

e5b68e2(current) vs b78d593 main#127(baseline)

Bundle metrics  no changes
                 Current
#128
     Baseline
#127
No change  Initial JS 74.91KiB 74.91KiB
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 45 45
No change  Assets 45 45
No change  Modules 45 45
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 0 0
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#128
     Baseline
#127
No change  JS 74.91KiB 74.91KiB

Bundle analysis reportBranch feat/expose-more-typesProject dashboard

Copy link
Member

@marclave marclave left a comment

Choose a reason for hiding this comment

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

:galaxy-brain: nice i find myself doing this too, will clean up the client a bunch

@hanspagel hanspagel force-pushed the feat/expose-more-types branch from 98aeb4a to d71a738 Compare July 23, 2024 17:32
Copy link

cloudflare-workers-and-pages bot commented Jul 23, 2024

Deploying openapi-parser with  Cloudflare Pages  Cloudflare Pages

Latest commit: e5b68e2
Status: ✅  Deploy successful!
Preview URL: https://5d78b5d2.openapi-parser.pages.dev
Branch Preview URL: https://feat-expose-more-types.openapi-parser.pages.dev

View logs

@hanspagel hanspagel enabled auto-merge (squash) July 23, 2024 17:34
@hanspagel hanspagel force-pushed the feat/expose-more-types branch from 8961db1 to e5b68e2 Compare July 23, 2024 17:34
@hanspagel hanspagel merged commit d2493fe into main Jul 23, 2024
6 checks passed
@hanspagel hanspagel deleted the feat/expose-more-types branch July 23, 2024 17:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants