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

feat!: new @scalar/openapi-types package #175

Merged
merged 6 commits into from
Aug 27, 2024
Merged

Conversation

hanspagel
Copy link
Member

@hanspagel hanspagel commented Aug 9, 2024

We modified and extended the openapi-types package for our use case. We’re basically allowing any user input, but still maintaining the types based on the OpenAPI specification.

With this PR, we’re exposing those types as a separate, dependency-free package called @scalar/openapi-types. Even comes with basic type tests. :)

Note: This is a breaking change. Instead of importing types from @scalar/openapi-parser, users now have to import from @scalar/openapi-types.

Usage

npm add @scalar/openapi-types

And use it like this:

import type { OpenAPI } from '@scalar/openapi-types'

const file: OpenAPI.Document = {
  openapi: '3.1.0',
  info: {
    title: 'Hello World',
    version: '1.0.0',
  },
  paths: {},
}

Copy link

changeset-bot bot commented Aug 9, 2024

🦋 Changeset detected

Latest commit: 5c955c8

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

This PR includes changesets to release 2 packages
Name Type
@scalar/openapi-parser Minor
@scalar/openapi-types 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

Copy link

relativeci bot commented Aug 9, 2024

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

5c955c8(current) vs aec9f22 main#137(baseline)

Bundle metrics  no changes
                 Current
#141
     Baseline
#137
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
#141
     Baseline
#137
No change  JS 74.91KiB 74.91KiB

Bundle analysis reportBranch feat/new-types-packageProject dashboard


Generated by RelativeCIDocumentationReport issue

Copy link

cloudflare-workers-and-pages bot commented Aug 9, 2024

Deploying openapi-parser with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5c955c8
Status: ✅  Deploy successful!
Preview URL: https://c3e716fd.openapi-parser.pages.dev
Branch Preview URL: https://feat-new-types-package.openapi-parser.pages.dev

View logs

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.

sick!

@hanspagel hanspagel changed the title feat: new @scalar/openapi-types package feat!: new @scalar/openapi-types package Aug 9, 2024
@amritk
Copy link
Member

amritk commented Aug 12, 2024

hey @hanspagel we are going to move the types into the monorepo so I'll copy them over, then there should be no breaking changes here. We can also just re-export them after for a single source of truth

@hanspagel hanspagel merged commit 5706b18 into main Aug 27, 2024
10 checks passed
@hanspagel hanspagel deleted the feat/new-types-package branch August 27, 2024 09:15
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