[PR #5880] feat: add Export as OpenAPI 3.1 to collection context menu #5390

Open
opened 2026-03-17 02:50:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5880
Author: @mcdgavin
Created: 2/14/2026
Status: 🔄 Open

Base: mainHead: feat/export-openapi


📝 Commits (1)

  • e456f83 feat: add Export as OpenAPI 3.1 to collection context menu

📊 Changes

8 files changed (+1906 additions, -1 deletions)

View changed files

📝 README.md (+1 -0)
📝 packages/hoppscotch-common/locales/en.json (+5 -1)
📝 packages/hoppscotch-common/src/components/collections/Collection.vue (+17 -0)
📝 packages/hoppscotch-common/src/components/collections/MyCollections.vue (+9 -0)
📝 packages/hoppscotch-common/src/components/collections/TeamCollections.vue (+9 -0)
📝 packages/hoppscotch-common/src/components/collections/index.vue (+115 -0)
packages/hoppscotch-common/src/helpers/import-export/export/__tests__/openapi.spec.ts (+1179 -0)
packages/hoppscotch-common/src/helpers/import-export/export/openapi.ts (+571 -0)

📄 Description

Summary

  • Adds an "Export as OpenAPI" option to the collection context menu for both personal and team collections
  • Converts Hoppscotch collections to OpenAPI 3.1 spec, mapping requests, folders, auth, headers, and parameters
  • Prompts the user to choose between JSON and YAML export formats via a modal before downloading

Closes #3821

Test plan

  • Right-click a personal collection → "Export as OpenAPI" → modal appears with JSON/YAML buttons
  • Click JSON → downloads a valid OpenAPI 3.1 JSON file
  • Click YAML → downloads a valid OpenAPI 3.1 YAML file
  • Repeat for team collections
  • Verify exported files parse correctly in an OpenAPI validator
  • Run cd packages/hoppscotch-common && pnpm test — all 634 tests pass

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5880 **Author:** [@mcdgavin](https://github.com/mcdgavin) **Created:** 2/14/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/export-openapi` --- ### 📝 Commits (1) - [`e456f83`](https://github.com/hoppscotch/hoppscotch/commit/e456f83b07c2481fa1a88e4173301763734bcb8f) feat: add Export as OpenAPI 3.1 to collection context menu ### 📊 Changes **8 files changed** (+1906 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -0) 📝 `packages/hoppscotch-common/locales/en.json` (+5 -1) 📝 `packages/hoppscotch-common/src/components/collections/Collection.vue` (+17 -0) 📝 `packages/hoppscotch-common/src/components/collections/MyCollections.vue` (+9 -0) 📝 `packages/hoppscotch-common/src/components/collections/TeamCollections.vue` (+9 -0) 📝 `packages/hoppscotch-common/src/components/collections/index.vue` (+115 -0) ➕ `packages/hoppscotch-common/src/helpers/import-export/export/__tests__/openapi.spec.ts` (+1179 -0) ➕ `packages/hoppscotch-common/src/helpers/import-export/export/openapi.ts` (+571 -0) </details> ### 📄 Description ## Summary - Adds an "Export as OpenAPI" option to the collection context menu for both personal and team collections - Converts Hoppscotch collections to OpenAPI 3.1 spec, mapping requests, folders, auth, headers, and parameters - Prompts the user to choose between JSON and YAML export formats via a modal before downloading Closes #3821 ## Test plan - [ ] Right-click a personal collection → "Export as OpenAPI" → modal appears with JSON/YAML buttons - [ ] Click JSON → downloads a valid OpenAPI 3.1 JSON file - [ ] Click YAML → downloads a valid OpenAPI 3.1 YAML file - [ ] Repeat for team collections - [ ] Verify exported files parse correctly in an OpenAPI validator - [ ] Run `cd packages/hoppscotch-common && pnpm test` — all 634 tests pass --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#5390
No description provided.