mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #3966] [MERGED] fix: use proper values for addTo field when auth type is api-key #4616
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#4616
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/3966
Author: @amk-dev
Created: 4/8/2024
Status: ✅ Merged
Merged: 4/16/2024
Merged by: @AndrewBastin
Base:
release/2024.3.1← Head:fix/api-key-addTo-values📝 Commits (4)
c087279fix: add a v4 for rest schema with constant addTo valuesdd6d8c8fix: add a v4 for graphql schema with constant addTo values2e30e35chore: use i18n values for pass by field5650b55chore: add i18n values📊 Changes
12 files changed (+182 additions, -30 deletions)
View changed files
📝
packages/hoppscotch-cli/src/utils/pre-request.ts(+2 -2)📝
packages/hoppscotch-common/locales/en.json(+2 -0)📝
packages/hoppscotch-common/src/components/graphql/Headers.vue(+1 -1)📝
packages/hoppscotch-common/src/components/http/authorization/ApiKey.vue(+15 -9)📝
packages/hoppscotch-common/src/helpers/graphql/connection.ts(+2 -2)📝
packages/hoppscotch-common/src/helpers/import-export/import/openapi.ts(+3 -3)📝
packages/hoppscotch-common/src/helpers/import-export/import/postman.ts(+2 -2)📝
packages/hoppscotch-common/src/helpers/utils/EffectiveURL.ts(+1 -1)📝
packages/hoppscotch-data/src/graphql/index.ts(+6 -4)➕
packages/hoppscotch-data/src/graphql/v/4.ts(+71 -0)📝
packages/hoppscotch-data/src/rest/index.ts(+8 -6)➕
packages/hoppscotch-data/src/rest/v/4.ts(+69 -0)📄 Description
FIXES HFE-466
Closes #3963
Changes
Previously when the auth type was
api-key, theaddTofield values where "Headers" or "Query params", and the type was a string.This PR updates the
addTofield to be an enum with the valuesHEADERSandQUERY_PARAMS. this is consistent with the OAuthaddTovalues, and also allows the type system to catch bugs that were previously not caught because any string value was accepted as a validaddTovalue.The issue #3963 is coming from this inconsistency, and this PR fixes it.
We could have kept the "Headers" and "Query params" and updated some checks. but i think this is a good time to make the values consistent and better typed, hence this PR.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.