Skip to content
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

fix(openapi): type fixes in prepareOas #1141

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

kanadgupta
Copy link
Member

@kanadgupta kanadgupta commented Jan 6, 2025

🧰 Changes

when reviewing #1126, i noticed a few small bugs in our prepareOas helper function. this PR makes a few typesafety improvements so we shouldn't run into this issue again(?)

one outstanding question that i'd like to figure out prior to merge, see #1142 (edit: going to continue bundling and handle this issue in a follow-up PR)

🧬 QA & Testing

do tests + types pass?

@kanadgupta kanadgupta added bug Something isn't working command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands labels Jan 6, 2025
@@ -213,7 +209,9 @@ export default async function prepareOas(
const specVersion: string = api.info.version;
debug(`version in spec: ${specVersion}`);

if (['openapi', 'openapi inspect', 'openapi reduce'].includes(command)) {
const commandsThatBundle: (typeof command)[] = ['openapi inspect', 'openapi reduce', 'openapi upload'];
Copy link
Member Author

Choose a reason for hiding this comment

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

🧐 do we want to bundle by default for openapi upload? see #1142

Copy link
Member

Choose a reason for hiding this comment

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

i think we have to because if we don't then they might upload an invalid spec that has ref pointers to a local file

@kanadgupta kanadgupta marked this pull request as ready for review January 6, 2025 20:20
@kanadgupta kanadgupta requested a review from erunion January 6, 2025 20:20
@kanadgupta kanadgupta merged commit fc55d28 into next Jan 6, 2025
10 checks passed
@kanadgupta kanadgupta deleted the kanad-2025-01-06/typesafe-prepareOas branch January 6, 2025 20:51
kanadgupta pushed a commit that referenced this pull request Jan 6, 2025
# [10.1.0-next.3](v10.1.0-next.2...v10.1.0-next.3) (2025-01-06)

### Bug Fixes

* **openapi:** type fixes in `prepareOas` ([#1141](#1141)) ([fc55d28](fc55d28))

[skip ci]
@kanadgupta
Copy link
Member Author

🎉 This PR is included in version 10.1.0-next.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

kanadgupta added a commit that referenced this pull request Jan 6, 2025
when reviewing #1126, i noticed a
few small bugs in our `prepareOas` helper function. this PR makes a few
typesafety improvements so we shouldn't run into this issue again(?)

~~one outstanding question that i'd like to figure out prior to merge,
see #1142 (**edit**: going to
continue bundling and handle this issue in a follow-up PR)

do tests + types pass?
kanadgupta pushed a commit that referenced this pull request Jan 6, 2025
* **openapi:** type fixes in `prepareOas` ([#1141](#1141)) ([fc55d28](fc55d28))

[skip ci]
kanadgupta added a commit that referenced this pull request Jan 6, 2025
## 🧰 Changes

reapplies the following changes from the `next` branch onto the `v9`
branch:

- [x] #1124
- [x] #1125
- [x] #1126
- [x] #1127
- [x] #1143
- [x] #1144
- [x] #1141

## 🧬 QA & Testing

do tests pass?

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
Co-authored-by: Jon Ursenbach <jon@ursenba.ch>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
kanadgupta pushed a commit that referenced this pull request Jan 14, 2025
# [10.1.0](v10.0.0...v10.1.0) (2025-01-14)

### Bug Fixes

* **openapi:** type fixes in `prepareOas` ([#1141](#1141)) ([fc55d28](fc55d28))

### Features

* **openapi:** a fresh coat of paint on `openapi inspect` ([#1127](#1127)) ([ff8c304](ff8c304))
* **openapi:** tooling upgrades ([#1126](#1126)) ([6678d68](6678d68))
* **v9:** backport openapi tooling etc. from v10 ([#1145](#1145)) ([14828db](14828db))

[skip ci]
@kanadgupta
Copy link
Member Author

🎉 This PR is included in version 10.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands released on @next released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants