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

Confusing uploading behavior for YAML files #1142

Open
kanadgupta opened this issue Jan 6, 2025 · 0 comments
Open

Confusing uploading behavior for YAML files #1142

kanadgupta opened this issue Jan 6, 2025 · 0 comments
Labels
bug Something isn't working command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands

Comments

@kanadgupta
Copy link
Member

In openapi upload, we currently always bundle (with the fix in #1141, at least) the OAS and convert it to JSON prior to sending it to ReadMe.

This creates unexpected behavior for YAML files, where it's possible to send a YAML file and we'll send the file with a .yml file extension, yet the file blob itself is JSON due to our converting/bundling.

How should we handle this? Should we ever send the original, unbundled, unconverted file?

@kanadgupta kanadgupta added bug Something isn't working command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands labels Jan 6, 2025
kanadgupta added a commit that referenced this issue 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 added a commit that referenced this issue 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?
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
Projects
None yet
Development

No branches or pull requests

1 participant