mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 09:16:03 +03:00
[PR #5831] [MERGED] fix(common): correctly populate OpenAPI response examples #5374
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5374
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5831
Author: @nivedin
Created: 2/4/2026
Status: ✅ Merged
Merged: 2/4/2026
Merged by: @jamesgeorge007
Base:
patch← Head:fix/open-api-example-schema📝 Commits (6)
0cf165efix: import examples instead of openapi schema0e554bcchore: accept null as example1d6455dchore: use generateRequestBodyExampleFromOpenAPIV2BodySchema9e5330fchore: fix type issuesbcd42a5chore: handle unresolved refs5ecae06chore: improve doc allow empty examples📊 Changes
2 files changed (+149 additions, -36 deletions)
View changed files
📝
packages/hoppscotch-common/src/helpers/import-export/import/openapi/example-generators/v2.ts(+4 -2)📝
packages/hoppscotch-common/src/helpers/import-export/import/openapi/index.ts(+145 -34)📄 Description
Closes FE-765 #4554
This PR fixes the issue where importing OpenAPI collections used to import the schema as the body for examples rather than the actual examples.
Before
After
What's changed
Notes to reviewers
Summary by cubic
Fixes OpenAPI import to use response examples instead of schemas. Imported collections now show real example payloads. Resolves FE-765 and #4554.
Written for commit
5ecae06a1b. Summary will update on new commits.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.