Skip to content

Conversation

@kanadgupta
Copy link
Member

🚥 Resolves RM-13895

🧰 Changes

fixes a few issues where URLs with no path (e.g., https://example.com) or URLs with query params (e.g., https://example.com/openapi?something=true) weren't being handled properly.

🧬 QA & Testing

do tests pass?

@kanadgupta kanadgupta added bug Something isn't working command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands labels Sep 16, 2025
@kanadgupta kanadgupta marked this pull request as ready for review September 16, 2025 22:33
Copy link
Member

@emilyskuo emilyskuo left a comment

Choose a reason for hiding this comment

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

so funky

@kanadgupta kanadgupta merged commit 9a827ab into next Sep 17, 2025
9 checks passed
@kanadgupta kanadgupta deleted the kanad-2025-09-16/handle-URLs-with-query-params branch September 17, 2025 00:19
kanadgupta pushed a commit that referenced this pull request Sep 17, 2025
## [10.5.2-next.1](v10.5.1...v10.5.2-next.1) (2025-09-17)

### Bug Fixes

* **openapi/upload:** handle funky URLs ([#1344](#1344)) ([9a827ab](9a827ab))

[skip ci]
@kanadgupta
Copy link
Member Author

🎉 This PR is included in version 10.5.2-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

kanadgupta pushed a commit that referenced this pull request Sep 24, 2025
## [10.5.2](v10.5.1...v10.5.2) (2025-09-24)

### Bug Fixes

* **openapi/upload:** better handling for mismatching files/slugs ([#1345](#1345)) ([a16fcae](a16fcae))
* **openapi/upload:** handle funky URLs ([#1344](#1344)) ([9a827ab](9a827ab))

[skip ci]
@kanadgupta
Copy link
Member Author

kanadgupta commented Sep 24, 2025

🎉 This PR is included in version 10.5.2 🎉

The release is available on:

(Note: Kanad wrote this by hand this because the semantic-release workflow failed.)

kanadgupta added a commit that referenced this pull request Oct 8, 2025
| 🚥 Resolves CX-1793 |
| :------------------- |

## 🧰 Changes

expanding on the work from #1344,
this PR tweaks a bunch of logic / DX improvements to better account for
the following `rdme openapi upload` edge cases:
- URL uploads that lack a path but have a custom slug with a JSON file
extension (e.g., `rdme openapi upload https://example.com
--custom-slug.json`) will now properly read that file and set that slug
- URL uploads that lack a path but have a custom slug with a YAML file
extension (e.g., `rdme openapi upload https://example.com
--custom-slug.yml`) will now properly read that file and set that slug
- URL uploads that lack a path and there's no `--slug` passed (e.g.,
`rdme openapi upload https://example.com`) will now default to
`openapi.json` and emit a warning about this behavior
- URL uploads with a path that lacks a file extension and there's no
`--slug` passed (e.g., `rdme openapi upload
https://example.com/some-path`) will now properly handle JSON/YAML and
set the slug to that path (e.g., `some-path.json`). [applicable for both
creates and updates]

## 🧬 QA & Testing

honestly the more test cases i added, the more rework i realized this
logic required 😮‍💨 the fact that they're passing brings me a lot of
comfort here lol
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants